Skip to content

Instantly share code, notes, and snippets.

@phoenix24
Created May 20, 2020 03:23
Show Gist options
  • Save phoenix24/48dc2b2043b62e05c3914cce565dabed to your computer and use it in GitHub Desktop.
Save phoenix24/48dc2b2043b62e05c3914cce565dabed to your computer and use it in GitHub Desktop.
"""allows collecting not explicitly assigned values into
a placeholder variable"""
a, *b, c = range(10)
print(a, b, c)
"""advanced example"""
[(c, *d, [*e]), f, *g] = [[1, 2, 3, 4, [5, 5, 5]], 6, 7, 8]
print(c, d, e, f, g)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment