I am very new to python ... I am using windows xp
i am writing a program in python , in which i want to sort the first elements of say 5 arrays
eg :
so i used zip to make them in to a single array
which = >
t= (a[0],b[0],c[0],r[0]),a[1],b[1],............r( 2))
now i used y=t(:1)
=> y = (a[0],b[0],c[0])
now if i say
y.sort()
print y
the result is y but its not gettin sorted
i am writing a program in python , in which i want to sort the first elements of say 5 arrays
eg :
Code:
a = [3,2,1] b=[7,5,3] c=[56,242,4] r=[3,146,124]
Code:
t= zip(a,b,c,d)
t= (a[0],b[0],c[0],r[0]),a[1],b[1],............r( 2))
now i used y=t(:1)
=> y = (a[0],b[0],c[0])
now if i say
y.sort()
print y
the result is y but its not gettin sorted
Comment