Learn practical skills, build real-world projects, and advance your career
def locate_card(cards,query):
    for i in cards:
        if i == query:
            return cards.index(i)
    else:
        return -1
cards=[13,11,12,7,4,3,1,0]
query=7
print(locate_card(cards,query))
3