Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- listA = ['one', 'two', 'three', 'four', 'five', 'six', 'seven']
- listB = listA[:]
- all(True if listA.count(item) <= listB.count(item) else False for item in listA)
- True
- listA.append('eight')
- all(True if listA.count(item) <= listB.count(item) else False for item in listA)
- False
- listB.append('eight')
- all(True if listA.count(item) <= listB.count(item) else False for item in listA)
- True
- listB.append('nine')
- all(True if listA.count(item) <= listB.count(item) else False for item in listA)
- True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement