-1
I’m collecting 7 different values through a while
. Every time the while
wheel, a value is assigned to the variable valor
and is printado
, but would like to save each valor
in a variable for later use.
For example, the first print, var1 = valor
, the second time, var2 = valor
, on the third time, var3 = valor
...
First you need to decide whether to print or assign a value.
– Maniero
Stores read values in a list. You can set
valor = []
and inside the while do:valor.append()
to add the new value in the list, so each value will be stored in a different index and can be used later.– Woss
Hi Anderson, thanks for the help, it worked great! Would you like to tell me how to turn the string into an integer? Thanks in advance!
– Milteven