Write a program to delete/remove all the numbers less than 10 from the list.
1 Like
numbers = [5, 12, 3, 20, 8, 15, 2, 30] new_list = [] for i in numbers: if i >= 10: new_list.append(i) print("List after removing numbers less than 10:", new_list)
List after removing numbers less than 10: [12, 20, 15, 30]
Answered By
3 Likes
Write a Python program to check that if a given number is even or odd.
Write a Python program to add all the elements of a tuple.
Write a Python program to find the largest element in a tuple.
Write a Python program to find the square of all elements between 1 to 20.