0
So about the function Def, here the code I can solve it in two ways, which is better? Thank you
the example it gave on the course is the one first one, and what I thought is the second one, so which is the best, or do they have different apply situations? thank you! https://code.sololearn.com/cV5omuT6LXkI/?ref=app
2 odpowiedzi
+ 6
Returning and/or printing depends on how you integrate this piece of code with other code. At this point, it doesn't really matter
You can do ternary, if it's your thing.
def max(x,y):
return (x if x >= y else y)
+ 1
Hatsy Rei got it! thank you