Advertisement
here2share

# list_check_if_all_matches.py

Sep 7th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. # list_check_if_all_matches.py
  2.  
  3. mylist = 'abc abc abc abc abc'.split()
  4. print len(set(mylist))<2
  5. mylist.append('xyz')
  6. print len(set(mylist))<2
  7. mylist=[]
  8. print len(set(mylist))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement