def heie(tabellplass_ordbok): if tabellplass_ordbok["Brann"] <= 3: return "Brann" for lag in tabellplass_ordbok: if tabellplass_ordbok[lag] == 1: return lag tabell = { "Brann": 2, "Odd": 4, "Molde": 1, "Bamble IF": 3 } print(heie(tabell))