首页 > 学院 > 开发设计 > 正文

412. Fizz Buzz(1行代码)

2019-11-06 08:19:08
字体:
来源:转载
供稿:网友

class Solution(object): def fizzBuzz(self, n): “”” :type n: int :rtype: List[str] “”” return [“Fizz”(not i%3) + “Buzz”(not i%5) or str(i) for i in range(1,n+1)]


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表