Ich weiß, wie man eine normale Liste wie SO sortiert:
Code: Select all
a=[2,1,3]
for i in range(0, len(a)):
for j in range(i+1,len(a)):
if (a[i]>a[j]):
a[i],a[j]=a[j],a[i]
return a
However, when it comes to sorting a list of tuples like (("b", 32), ("c", 1), ("a", 23)) and that I have to reorder it in order of the second element without using sort() or lambda() or any in-built function, I don't know how to do Es. Kann mir bitte jemand helfen?:)