list = [234, 454, 123444, 123, 234, 122234, 234, 354, 654, 123231, 234, 342, 1231231]
print (list)
list.sort()
print (list)
my_len = len(list)
print (my_len)
print ("The longest ones are at the end")
print (list[my_len-1])
print (list[my_len-2])
# output
# [234, 454, 123444, 123, 234, 122234, 234, 354, 654, 123231, 234, 342, 1231231]
# [123, 234, 234, 234, 234, 342, 354, 454, 654, 122234, 123231, 123444, 1231231]
# 13
# The longest ones are at the end
# 1231231
# 123444
# Ok how about this
list = [234, 454, 123444, 123, 234, 122234, 234, 354, 654, 123231, 234, 342, 1231231]
print (list)
my_new_list = []
for idx, val in enumerate(list):
print(idx, val)
my_new_list.append((idx,val))
print(my_new_list)
# output
#[234, 454, 123444, 123, 234, 122234, 234, 354, 654, 123231, 234,
#342, 1231231]
#0 234
#1 454
#2 123444
#3 123
#4 234
#5 122234
#6 234
#7 354
#8 654
#9 123231
#10 234
#11 342
#12 1231231
#[(0, 234), (1, 454), (2, 123444), (3, 123), (4, 234), (5, 122234),
#(6, 234), (7, 354), (8, 654), (9, 123231), (10, 234), (11, 342),
#(12, 1231231)]