+ 2
About "return" statement
m a little bit confused about return how they work? different between return and print how to use return example plz
3 odpowiedzi
+ 30
print() means display text to the screen.
ex. print(123)
// output :123
return is keyword to return from a function i.e. break out of the function.
ex.
def ex():
return 1
print(ex())
//output 1
+ 2
still not properly understood can someone explain with 2 different example in different situation plz
+ 1
how return work in loops or own made function?