Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

can only concatenate str (not "int") to str

So for example the code below throw an error:
print( "String" + 1234)

like this:
Traceback (most recent call last):
  File "<pyshell#12>", line 1, in <module>
    print( "String" + 1234)
TypeError: can only concatenate str (not "int") to str
  
To solve the issue, just add str to your number or value like:
print( "String" + str(1234))

And the result as:
String1234
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #concatenate #str #str
ADD COMMENT
Topic
Name
5+9 =