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

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -