Computer Science

What is the output of this code ?

 >>> int("3" + "4")
  1. "7"
  2. "34"
  3. 34
  4. 24

Python String Manipulation

2 Likes

Answer

Output
34

Reason — The + operator concatenates two strings and int converts it to integer type.

int("3" + "4")
= int("34")
= 34

Answered By

3 Likes


Related Questions