Skip to content

Instantly share code, notes, and snippets.

@lwzm
Last active August 29, 2015 13:57
Show Gist options
  • Save lwzm/9762118 to your computer and use it in GitHub Desktop.
Save lwzm/9762118 to your computer and use it in GitHub Desktop.
a, b, *c = 1,2,3,4,5
*a, b = 1,2,3,4
a, *b, c = 1,2,3,4,5
[i for i, *_ in [[0], [1, 2], [3, 4, 5]]]
lst = [(0,), (1,), (2,), (3,), (4,), (5,), (6,), (7,), (8,), (9,)]
assert [i for i, in lst] == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment