fork download
  1. mixed = [1, 1.5, 2, 2.5, 3]
  2. mixed.sort()
  3. print mixed
  4. mixed.sort(key=int)
  5. print mixed
  6. mixed.sort(key=float)
  7. print mixed
Success #stdin #stdout 0s 23296KB
stdin
Standard input is empty
stdout
[1, 1.5, 2, 2.5, 3]
[1, 1.5, 2, 2.5, 3]
[1, 1.5, 2, 2.5, 3]