Home
Press ? for keyboard navigation
❮
sort mixed values
sorting with sorted
❯
sort mixed values fixed with str
examples/lists/sort_mixed_with_str.py
mixed
=
[
100
,
'foo'
,
42
,
'bar'
]
print
(
mixed
)
mixed
.
sort
(
key
=
str
)
print
(
mixed
)
Index (i)
Table of Contents (t)
Indexed keywords (k)
Chapter TOC (d)
Hide/Show (h)