Write a Python program to find the largest element in a tuple.
1 Like
t = (12, 45, 7, 89, 34) largest = t[0] for i in t: if i > largest: largest = i print("The largest element in the tuple is:", largest)
The largest element in the tuple is: 89
Answered By
2 Likes
Write a Python program to add all the elements of a tuple.
Write a program to delete/remove all the numbers less than 10 from the list.
Write a Python program to find the square of all elements between 1 to 20.
Write a Python program to demonstrate the use of the if-elif-else statements.