504,973 views
14 votes
14 votes
What is printed by the python code? print('2' + '3')

User Randomsolutions
by
3.1k points

2 Answers

17 votes
17 votes

Answer:

23

Step-by-step explanation:

User Bytebiscuit
by
3.3k points
18 votes
18 votes

Answer:

23

Step-by-step explanation:

Given

print('2' + '3')

Required

The output

First, the expression in bracket is evaluated.

'2' + '3' = '23' i.e. The + concatenates '2' and '3'

So, the statement becomes

print('23')

The above statement prints the expression in quotes.

Hence, the output is 23

User Phil Carter
by
3.6k points