write a python program to add a number to the existing list using append function and to remove odd numbers from the given list
don't post unnecessary comments...I only need answer... I'll mark u as brainliest
Answers
Answered by
1
Answer:
Using for loop : Iterate each element in the list using for loop and check if num % 2 != 0. If the condition satisfies, then only print the number.
filter_none
edit
play_arrow
brightness_4
# Python program to print odd Numbers in a List
# list of numbers
list1 = [10, 21, 4, 45, 66, 93]
# iterating each number in list
for num in list1:
# checking condition
if num % 2 != 0:
print(num, end = " "
Explanation:
Similar questions