from random import randint
def odd(n):
return n % 2
allNums = []
for eachNum in range(9):
# allNums.append(randint(1, 99))
# print filter(odd, allNums)
print eachNum
C:Python27python.exe C:/Users/TLCB/PycharmProjects/untitled/core/a10.py
0
1
2
3
4
5
6
7
8
from random import randint
def odd(n):
return n % 2
allNums = []
for eachNum in range(9):
a=randint(1, 99)
print a
# allNums.append(randint(1, 99))
# print filter(odd, allNums)
C:Python27python.exe C:/Users/TLCB/PycharmProjects/untitled/core/a10.py
44
20
86
69
6
24
99
1
14
from random import randint
def odd(n):
return n % 2
allNums = []
for eachNum in range(9):
a=randint(1, 99)
print a
# allNums.append(randint(1, 99))
# print filter(odd, allNums)
allNums.append(a)
print allNums
print filter(odd, allNums)