Skip to content

Latest commit

 

History

History

typeerror-unsupported-operand-types

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

readme.md

TypeError: unsupported operand type(s) for +: 'int' and 'str'

Reproduce

a = 10
b = "5"

result = a + b
print(result)

Error Message

TypeError: unsupported operand type(s) for +: 'int' and 'str'

Fix

a = 10
b = "5"

result = a + int(b)
print(result)

Reflection

I mixed types without noticing and tried to add them directly.