Write a function, `gooseFilter` / `goose-filter` / `goose_filter` /` GooseFilter`, that takes an array of strings as an argument and returns a filtered array containing the same elements but with the 'geese' removed.

The geese are any strings in the following array, which is pre-populated in your solution:

```python
geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
```

For example, if this array were passed as an argument:

```python
["Mallard", "Hook Bill", "African", "Crested", "Pilgrim", "Toulouse", "Blue Swedish"]
```

Your function would return the following array:

```python
["Mallard", "Hook Bill", "Crested", "Blue Swedish"]
```

The elements in the returned array should be in the same order as in the initial array passed to your function, albeit with the 'geese' removed. Note that all of the strings will be in the same case as those provided, and some elements may be repeated.

Difficulty: introductory

Starter code:

def goose_filter(birds):
	

Solutions:
geese = {"African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"}

def goose_filter(birds):
    return [bird for bird in birds if bird not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds):
    return list(filter(lambda x: x not in geese, birds))

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds):
    return [b for b in birds if b not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds):
    return[x for x in birds if x  not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    
    for j in geese:    #For each element in geese
        for i in birds:    #For each element in birds 
            if i == j:
                birds.remove(i)                        
    return birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds):
    return [bird for bird in birds if bird not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    l=[]
    for i in birds:
        if i not in geese:
            l.append(i)
    return(l)

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds):
    return [i for i in birds if i not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    new_list=[]
    
    for word in geese:
        for words in birds:
            if word == words:
                birds.remove(word)
    return birds

geese = ["Roman Tufted", "African",  "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    for goose in geese:
        for bir in birds:
            if goose == bir:
                birds.remove(bir)
    return birds


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds):
    for i in range(len(geese)):
        if geese[i] in birds:
            ind = birds.index(geese[i])
            birds.pop(ind)
    return birds



goose_filter=lambda l:[e for e in l if e[:3]not in"AfrRomTouPilSte"]

goose_filter=lambda birds:[bird for bird in birds if bird not in ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]]

goose_filter=lambda x:[g for g in x if g[:3]not in"AfrRomTouPilSte"]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds):
  output = []
  for a in birds:
    if a not in geese:
      output.append(a);
  return output

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def filtergeese(bird):
    if bird in geese:
        return False
    else:
        return True     

def goose_filter(birds): 
    return list(filter(filtergeese, birds))
  


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return list(filter(lambda v: not geese.__contains__(v),birds))

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    result = [element for element in birds if not element in geese]
    return result

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    list = []
    for x in birds:
        if x not in geese:
            list.append(x)
    return list

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    for x in geese:
        for x in birds:
            if x in geese:
                birds.remove(x)
    return(birds)


goose_filter = lambda gl: [g for g in gl if g not in ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]]


def goose_filter(birds):
    return [i for i in birds if i not in ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]]

goose_filter=lambda b: [e for e in b if e not in ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    result = []
    for i in birds:
            if i != geese[0] and i != geese[1] and i != geese[2] and i != geese[3] and i != geese[4]:
                result.append(i)
    return result


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return [el for i, el in enumerate(birds) if el not in geese] 

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    for word in geese:
        while word in birds:
            birds.remove(word)
    return birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

import re

def goose_filter(birds):
    listn = []
    for i in birds:
        if i not in geese:
            listn.append(i)
    return listn

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    oplst = []
    for bird in birds:
        if bird not in geese:
            oplst.append(bird)
    return oplst

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    filtered_list = []
    for x in birds:
        if x not in geese:
            filtered_list.append(x)
    return (filtered_list)    

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    result = []
    for i in geese:
        for j in birds:
            if i == j:
                birds.remove(i)
    #your code here
    return birds


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return list(el for el in birds if el not in geese)

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    s = []
    for el in birds:
        if not el in geese: s.append(el)
    return s

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    l = []
    for n in birds:
        if n not in geese:
            l.append(n)
    return l

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return [brd for brd in birds if brd not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    bird = [x for x in birds if x not in geese]
    return bird


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    b = sorted( set(birds), key=birds.index )
    return [s for s in b if s not in geese]


def goose_filter(l):
    return [b for b in l if b[:3] not in ['Afr','Rom','Tou','Pil','Ste']]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    #your code here
    arr = []
    for i in birds:
        if i in geese:
            continue
        else:
            arr.append(i)
    return arr

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return [el for el in birds if not el in geese]

geese = set(["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"])

def goose_filter(birds):
    return [*filter(lambda s: s not in geese, birds)] 

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    without_geese = []
    for i in birds:
        if i not in geese:
            without_geese.append(i)
    return without_geese

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return [x for x in birds if x not in set(geese)]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    res = []
    for string in birds:
        if string not in geese:
            res.append(string)
    return res

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds): return [non_geese for non_geese in birds if non_geese not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    filtered_birds = []
    for i in range(len(birds)):
        if birds[i] in geese:
            None
        else:
            filtered_birds.append(birds[i])
    return filtered_birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return list(birds[i] for i in range(len(birds)) if birds[i] not in geese)

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]


def goose_filter(birds):
    result = list(filter(lambda x:x not in geese,birds))
    return result

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    x = []
    for i in range(len(birds)):
        if birds[i] in geese:
            x = x
        else:
            x.append(birds[i])
    return x

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
from itertools import filterfalse
def goose_filter(birds):
    return list(filterfalse(lambda x: x in geese, birds))

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

import itertools
def goose_filter(birds):
    a=[n for n in birds if n not in geese]
    return a

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    '''we will iterate through the array preserving order while excluding the aforemntioned geese list'''
    return [x for x in birds if x not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds):
    lonely_birds = []
    for i in birds:
        if i not in geese:
            lonely_birds.append(i)
    return lonely_birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    for elem in geese:
        for bird in birds:
            if elem in birds:
                birds.remove(elem)
    return birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return [bird for bird in birds if bird not in geese]
    # returns every element in (birds) that is not in (geese)


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    geeseLess = []
    for i in range(len(birds)): 
        if birds[i] not in geese:
            geeseLess.append(birds[i])
    return geeseLess

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return [m for m in birds if m not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    n = []
    for i in birds:
        if i not in geese:
            n.append(i)
    return n

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    notgeese = []
    for el in birds:
        if el not in geese:
            notgeese.append(el)
    return notgeese

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    new_birds = []
    for animal in birds:
        if animal not in geese:
            new_birds.append(animal)
    return new_birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    anew = [i for i in birds if i not in geese]
    return anew


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    n = []
    for bird in birds:
        if bird not in geese:
            n.append(bird)
    return n
    # go through birds list if matches any in list drop string
    # loop through all birds match place in lists


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds: list) -> list:
    return [x for x in birds if x not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    out = []
    for el1 in birds:
        if el1 not in geese:
            out.append(el1)
    return out

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
def goose_filter(birds):
    l=[]
    g=[]
    for x in birds:
        if x in geese:
            l.append(birds.index(x))
    for i in range(len(birds)):
        if i not in l:
            g.append(birds[i])
    return g



def goose_filter(birds):
    geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
    new = []
    for i in birds:
        if i in geese:
            continue
        else:
            new.append(i)
    return new


def goose_filter(birds):
    geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
    new=[]
    for x in birds:
        if x not in geese:
            new.append(x)
    return new

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return [bird for bird in birds if bird not in (set(birds) & set(geese))]


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return [words for words in birds if all(char not in words for char in geese)]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    ans=birds.copy()
    for i in birds:
        if i in geese:
            ans.remove(i)
    return ans

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    return list([w for w in birds if w not in geese])


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    
    delete_array = []
    
    for i in range(len(birds)):
        
        if birds[i] in geese:
            
            delete_array.append(birds[i])
            
    for i in delete_array:
        

        if i in birds:
            
            birds.remove(i)

    #print(delete_array)
            
    return birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    #your code here
    l = []
    for i in range(0,len(birds)):
        if birds[i] not in geese:
            l.append(birds[i])
    return(l)

def goose_filter(bs):
    return [x for x in bs if x not in ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    newlist = []
    for eachvalue in birds:
        if eachvalue in geese:
            continue
        else:
            newlist.append(eachvalue)
    return newlist

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    answer = []
    for bird in birds:
        if bird in geese:
            continue
        answer.append(bird)     
    return answer

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    arr = []
    for strn in birds:
        if strn not in geese:
            arr.append(strn)
    return arr        

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
c =[]
def goose_filter(birds):
        for x in geese:
            if x in birds:
                birds.remove(x)
        return birds
    #your code here


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    ls=[]
    for i in birds:
        if i in geese:
            continue
        ls.append(i)
    return ls

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    for g in geese:
        for s in birds:
            if s == g:
                birds.remove(g)
    return birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
  for y in geese:
      for x in birds:
          if x == y:
              birds.remove(x)
    
  return birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(words):
    clean = []
    
    for x in words:
        if x not in geese:
            clean.append(x)
    return clean

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    for i in geese:
        try:
            birds.remove(i)
        except:
            pass
    return birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    s = list()
    for b in birds:
        if b in geese:
            continue
        else:
            s.append(b)
    return s

a = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(b):
    for x in a:
        for x in b:
            if x in a:
                b.remove(x)
    return b 

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    #your code here
    new = []
    for bird in birds:
        if bird not in geese:
            new.append(bird)
    return new

# change list to set to speed up search
geese = {"African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"}

def goose_filter(birds):
     return [x for x in birds if x not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

# given an array of strings, return a new array removing strings found in geese
# The elements in the returned array should be in the same order as in the initial array passed to your function
# some elements may be repeated and all will be in the same case

# input - array of strings
# output - array of strings

def goose_filter(birds):
# return element in birds if element is not in geese
    return [x for x in birds if x not in geese]



def goose_filter(birds):
    return [x for x in birds if x not in  ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    salir = False
    while salir != True:
        salir = True
        for b in birds:
            if b in geese:
                birds.remove(b)
                salir = False
        
    return birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    
    done = list()
    for word in birds:
        if word in geese:
            continue
        else:
            done.append(word)
    return done

a = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(b):
    return [i for i in b if i not in a]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds:list) -> list:
    answer:list = []
    for bird in birds:
        if not bird in geese:
            answer.append(bird)
    return answer


def goose_filter(birds):
    geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
    for bir in geese:
        if bir in birds:
            birds.remove(bir)
    return birds

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    geese_set = set(geese)
    return [elem for elem in birds if elem not in geese_set]
            


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    a=[]
    for i in birds:
        if i not in geese:
            a.append(i)
    return a
#     return [b for b in birds if b not in geese]


geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    list = []
    for word in birds:
        if not word in geese:
            list.append(word)
    return list

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    print(birds)
    return [bird for bird in birds if bird not in geese]

geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]

def goose_filter(birds):
    for y in geese:
        if y in birds:
            birds.remove(y)
    return birds

def goose_filter(birds):
    geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"]
    newList = []
    for word in birds:
        if word not in geese:
            newList += [word]
    return newList