0
I don't know why this code prints: Hi None Hi None, can someone tell me why it prints a None at the end?
def some_func(): print("Hi!") var = some_func() print(var) print(some_func())
2 Answers
+ 9
Because your final statement prints the some_func() function which doesn't return a value.
+ 1
just call the function like this : some_func()
it does not return anything so var has nothing.