Python membuat daftar angka ganjil
odd_list = []
for a in range(1, 10, 2):
odd_list.append(a)
print(odd_list)
Kodi4444
odd_list = []
for a in range(1, 10, 2):
odd_list.append(a)
print(odd_list)
odd_list = []
for a in range(10):
if a % 2 != 0:
odd_list.append(a)
print(odd_list)
L=([i%2 for i in range(10)])
print(L)