Checks if the elements of the first list are contained in the second one regardless of order.
- Use 
count()to check if any value inahas more occurrences than it has inb. - Return 
Falseif any such value is found,Trueotherwise. 
代码实现
def is_contained_in(a, b):
  for v in set(a):
    if a.count(v) > b.count(v):
      return False
  return True
使用样例
is_contained_in([1, 4], [2, 4, 1]) # True
翻译自:https://www.30secondsofcode.org/python/s/is-contained-in