[Tutor] Matrix Transpose
Alan Gauld
alan.gauld at blueyonder.co.uk
Sat Aug 30 00:03:18 EDT 2003
> ##########k=k=[ input() for i in range(input('Enter no of Rows:'))]
> ####Alternative input..for comma seperated values only
>
> k=[[int(p) for p in raw_input(",").split()] for i in
range(input('Enter no
> of Rows:'))]
> for a in [[k[x][y] for x in range(len(k))] for y in
range(len(k[0]))]:print
> a
I assume this is for some kind of obfuscated Python contest?
One of the attractions of Python is that it's normally difficult
to write code that's hard to read, but you have proved that
it is undoubtedly possible!
As a matter of interest do you ever intend to update this program
in, say, 6 months time?
Alan G.
More information about the Tutor
mailing list