+ 2

Is print('1' + '1') = 11 or it is '11'

30th Mar 2020, 6:15 PM
Nomita Patwal
Nomita Patwal - avatar
2 Answers
+ 2
Assuming the context kanguage is python: '1'+'1' give a string '11', but if you print it, you will visually get the same as 11 (number)... to print the difference, use: print('string 11:',repr('11')) print('number 11:',repr(11))
31st Mar 2020, 4:43 AM
visph
visph - avatar