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

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

c# - WPF Expander overlay used in ItemsControl -

class - Kivy: how to instantiate a dynamic classes in python -