python - Error with print: unsupported operand type(s) for +: 'NoneType' and 'str' -
I have the code to add two strings but this is showing me an error.
+: 'Any type' and 'str' for unsupported operand type (s)
How can I fix it?
print
is a function, no one is returning
Then when you write
print (name) + "good boy"
You are actually adding return value function call ( I.e. none) in the string
print (name, "good boy")
Comments
Post a Comment