“só pode concatenar str (não "int") para str” Respostas de código

só pode concatenar str (não "int") para str

# To solve the issue, just add str to your number or value like:

print( "Alireza" + str(1980))
UnAngeloCheSiChiamaTheKing

só pode concatenar str (não "int") para 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
Vast Vendace

Respostas semelhantes a “só pode concatenar str (não "int") para str”

Perguntas semelhantes a “só pode concatenar str (não "int") para str”

Mais respostas relacionadas para “só pode concatenar str (não "int") para str” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código