Advertisement
here2share

# set_autoremdups.py

May 29th, 2015
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. # set_auto_removes_duplicates.py
  2.  
  3. basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} # Note: called sets as of curly braces
  4. print list(basket)          # show that duplicates have been removed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement