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

python - Strange behavior using PyQt4's 'pyqtSlot' decorator before another decorator -

c# - UnhandledExceptionMode.ThrowException for AppDomain.UnhandledException -

c# - Process.Kill() returns access denied -