Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # list_check_if_all_matches.py
- mylist = 'abc abc abc abc abc'.split()
- print len(set(mylist))<2
- mylist.append('xyz')
- print len(set(mylist))<2
- mylist=[]
- print len(set(mylist))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement