list1 = [112, 33, 222, 444, 112, 33123, 222, 12]
for i in range(1, len(list1) - 1):
if list1[0] < list1[i]:
list1[0] = list1[i]
print(list1[:1])
- 1
- 2
- 3
- 4
- 5
list1 = [112, 33, 222, 444, 112, 33123, 222, 12]
for i in range(1, len(list1) - 1):
if list1[0] < list1[i]:
list1[0] = list1[i]
print(list1[:1])