hashSearch

def hashSearch(list, word):
    bundeslaenderList = []
    citiesDict = {}

    for line in list:
        try:
            citiesDict[line[1]].append(tuple([line[0], line[1]]))
        except:
            citiesDict[line[1]] = []
            citiesDict[line[1]].append(tuple([line[0], line[1]]))

    return linearSearch(citiesDict[word[1]], word[0])
    print(citiesDict[word[1]][linearSearch(citiesDict[word[1]], word[0])])