1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] Can you have variables inside variables in python? [closed]

Discussão em 'Python' iniciado por Stack, Outubro 4, 2024 às 20:32.

  1. Stack

    Stack Membro Participativo

    Is there a way to make variables that have to be accessed through another? For example: I want to store a players position in a game with X and Y variables, like this:

    Player.X = 50
    Player.Y = 102


    And to access them, I have to do it through the Player object:

    print(Player.X)


    Think of this as structures in c++ and c.

    Continue reading...

Compartilhe esta Página