So happy for Python 3.10
def fizzbuzz(n):
match n%3, n%5:
case (0,0):
return 'fizzbuzz'
case (0,_):
return 'fizz'
case (_,0):
return 'buzz'
case (_,_):
return n
So happy for Python 3.10
def fizzbuzz(n):
match n%3, n%5:
case (0,0):
return 'fizzbuzz'
case (0,_):
return 'fizz'
case (_,0):
return 'buzz'
case (_,_):
return n
Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from Gravatar.