奇数判定のシンプルな書き方を知らなかったので。
def in_odd(value):
if value % 2 == 1:
return True
return False
list = [ 0,1,2,3,4,5,6,7,8,9 ]
for item in filter(in_odd,list):
print(item)
今知った。
独り言ありがとう。
Go to list of users who liked
More than 3 years have passed since last update.
奇数判定のシンプルな書き方を知らなかったので。
def in_odd(value):
if value % 2 == 1:
return True
return False
list = [ 0,1,2,3,4,5,6,7,8,9 ]
for item in filter(in_odd,list):
print(item)
今知った。
独り言ありがとう。
Register as a new user and use Qiita more conveniently
Go to list of users who liked