+ 1

String=""; string+=4; explain the ans?

7th Jul 2017, 11:07 AM
Jenitha Sinnappane B
Jenitha Sinnappane B - avatar
2 Answers
+ 2
you cannot add a string and a integer together, though you can convert the integer into a string and then concatnate them.
7th Jul 2017, 11:45 AM
Joseph David Zamora Murillo
Joseph David Zamora Murillo - avatar
+ 2
You should first state that it i Python. Secondly, only objects of the same datatype add up.
7th Jul 2017, 1:05 PM
👑 Prometheus 🇾🇬
👑 Prometheus 🇾🇬 - avatar