A

Admin • 802.91K Points
Coach

Q. What is the output of the following code?

Code:
print('1' + 2)
  • (A) 3
  • (B) '12'
  • (C) Error
  • (D) '1 2'
  • Correct Answer - Option(C)
  • Views: 4
  • Filed under category Python
  • Hashtags:

Explanation by: Admin
You cannot concatenate string and integer without conversion.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.