while not sorted?(x):
if not x:
last = x
for y in x[1:]:
if y < last:
last = y
constructive criticism appreciated
It is a wonderfully whimsical sorting algorithm: there is no guarantee of termination...and the probability of termination is somewhere around ~1/n! Awesome. The average bound for the time complexity of this sort is factorial time or rather O(n*n!) because the "sorted?" function is linear time (and I am assuming python's shuffle is also linear time).
This is even more whimsical than the "lets try every permutation, till we find the sorted one", because this brute force algorithm guarantees termination, and can only get a worst-case time complexity to match your average.
Well done! I wish I was in the mood to write a perl poem describing it, but I am not.
EDIT: One failing, however, is that when it does terminate, it terminates with the correct output...but I suppose removing that would change it from an act of whimsy to just plain wrong.
Accept the past. Live for the present. Look forward to the future. Robot Fusion
"As our island of knowledge grows, so does the shore of our ignorance." John Wheeler
"[A] scientist looking at nonscientific problems is just as dumb as the next guy." Richard Feynman
"[P]etabytes of  data is not the same thing as understanding emergent mechanisms and structures." Jim Crutchfield