0

I'm quite new to Python and maybe my question is a simple one, but I tried to search it on the internet and I couldn't find a solution.

I need to generate variables with a name xxx+number with the same value as the number. Final result should be to create a list of variables like this:

xxx1 = 1

xxx2 = 2

.
.
.

xxx999 = 999

That way I can use those variables for the rest of the code. I tried with "for i in range(999):" and then tried .append, str(i) or similars with no success.

tchap
  • 3,412
  • 3
  • 29
  • 46

0 Answers0