def array_diff(a, b):
    return a if not b else [x for x in a if x != b[0]]

def array_diff(a, b):
    return [x for x in a if x not in set(b)]

Change code because failed the random test
Change code because failed the random test

  def array_diff(a, b):
-     return a if not b else [x for x in a if x != b[0]]
+     return [x for x in a if x not in set(b)]
  
Change code because failed the random test
## Code Before:
def array_diff(a, b):
    return a if not b else [x for x in a if x != b[0]]

## Instruction:
Change code because failed the random test
## Code After:
def array_diff(a, b):
    return [x for x in a if x not in set(b)]
