Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 10)
10.
What will happen if you try to concatenate a string and an integer using the + operator?
Error: Cannot concatenate string and integer
The integer will be converted to a string and concatenated
The string will be converted to an integer and concatenated
The program will terminate
Answer: Option
Explanation:
In Python, attempting to concatenate a string and an integer using + will result in a TypeError.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.