Answer the question
In order to leave comments, you need to log in
How to print the result of a function?
I can't display the result of the function. I do everything exactly according to the example - it does not output anything at all.
For example, here it is:
def my_func(name):
name = input('What is your name?: ')
print(name)
my_func(name)
Answer the question
In order to leave comments, you need to log in
my_func(name)
It would be better like this:
What did you expect?
def my_func( name ):
name = input('What is your name?: ')
print( name )
my_func( "xxx" )
[[email protected] own.WORK]$ python3 draft.py
What is your name?: aaa
aaa
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question