I’m new at python. Can someone help me understand the following error:
>>> a='1' >>> a+'2' '12' >>> len(a) 1 >>> a+len(a) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: cannot concatenate 'str' and 'int' objects
When len(a) is 1, why am I not obtaining the value as ‘21’?
Thanks in advance.