[Python] TypeError: keys() takes no arguments (1 given)

Discussão em 'Python' iniciado por Stack, Agosto 18, 2025.

  1. Stack

    Stack Membro Participativo

    When I hit "5", my program doesn't give me back all the keys in a form of a list (as expected) but an error occurs instead:


    TypeError: keys() takes no arguments (1 given)
    ​

    Why is that?

    elif choice == "5":
    print("\nOto wszystkie terminy znajdujace sie w slowniku:")
    for i in dictionary:
    print(dictionary.keys(i))

    Continue reading...

Compartilhe esta Página