I was trying to concatenate a string and a number in Python. It gave me an error when I tried this:
"abc" + 9
The error is:
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
"abc" + 9
TypeError: cannot concatenate 'str' and 'int' objects
Why am I not able to do this?
How can I concatenate a string and a number in Python?