- May 24, 2020
- 160
- 79
Hey everyone,
I'm struggling with Python and the variables.
I don't know, how to call variables correctly.
My explicit example would be this:
with goal being an array, that has to be filled to keep working with it (Beneath goal, there's shit, that's happening with goal)
In this particular example i want to have a lot of "goals"
but for this to work the for j in range has to be read, but i have to put in an integer, right?
So how do i call the test1-4 integers correctly? (numbername shall not be the string, but the integer behind test1, test2, test3, test4)
It's quite a fundamental knowledge-check, that I have yet to pass...
Thanks in advance
I'm struggling with Python and the variables.
I don't know, how to call variables correctly.
My explicit example would be this:
Python:
$test1 = 10
$test2 = 100
$test3 = 500
$test4 = 6
for i in range(0, 4):
$numbername = "test" + str(i)
for j in range(0, "numbername"):
goal = (i, j)
In this particular example i want to have a lot of "goals"
but for this to work the for j in range has to be read, but i have to put in an integer, right?
So how do i call the test1-4 integers correctly? (numbername shall not be the string, but the integer behind test1, test2, test3, test4)
It's quite a fundamental knowledge-check, that I have yet to pass...
Thanks in advance