изиlst = [1, 54, 43, 2, 6, 97, 3, 5]lst_2 = []for num in lst: if num % 2 != 0: # num % 2 == 1 lst_2.append(num)print(len(lst_2))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
изи
lst = [1, 54, 43, 2, 6, 97, 3, 5]
lst_2 = []
for num in lst:
if num % 2 != 0: # num % 2 == 1
lst_2.append(num)
print(len(lst_2))