+ 1
what does return do?
What does 'return' do?
6 Respostas
+ 14
def whatDoesItDo():
return "I don't know"
print(whatDoesItDo())
+ 5
It is a keyword in Python that can only be used in functions to terminate a function and return a value
+ 3
Return a value or variable content
+ 1
So for example:
Def hello():
Return ("hello")
Hello()
This returns the "hello" ?
+ 1
Yes Sean but you must to take care about indentation (tabs and spaces at the begining of the line)
def hello():
Return ("hello")
Hello()
+ 1
Ahh thanks alot guys.