[Python] Declare a global variable with certain type

Discussão em 'Python' iniciado por Stack, Março 5, 2025.

  1. Stack

    Stack Membro Participativo

    In python, is it possible to declare a global variable with a type? I know this is fine to declare a local variable like this.

    student: Student


    Or

    global student


    But I'm looking for something like this

    global student: Student

    Continue reading...

Compartilhe esta Página