Skip to content

Instantly share code, notes, and snippets.

@jedbrown
Created February 17, 2011 12:40
Show Gist options
  • Save jedbrown/831639 to your computer and use it in GitHub Desktop.
Save jedbrown/831639 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
s = set()
a = range(3)
s.update(a)
print(list(a)) # [0, 1, 2]
b = map(lambda x:10+x,a)
print(list(b)) # [10, 11, 12]
s.update(b)
print(list(b)) # []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment