I'm supposed to do it with a for cycle. Maybe it's too late but I just can quite start it. I'm supposed to rearrange it if an item is greater than the one next to it, they should change space.
l = [ 12, 51, 10, 46, 8, 17, 39 ]
for i in range(len(l)):
if i > i + 1:
this is as far as I've gotten.