3 ms·
FWIW, Python 3 improves case 1 to: a, b, c, *_ = list better, you can put the slice at at any point of the left hand, so if you want the first and last el
by masklinn 15y ago
FWIW, Python 3 improves case 1 to:
a, b, c, *_ = list
better, you can put the slice at at any point of the left hand, so if you want the first and last elements of your list (and want to ignore everything else) you can write:
a, *_, b = list