Creating multiple variables based on an integer

后端 未结 2 1266
Happy的楠姐
Happy的楠姐 2021-01-27 10:55

I want to create multiple variables based on a number that I have defined.
Currently, I have a client and a server running and every time a client joins, I want the server t

2条回答
  •  遇见更好的自我
    2021-01-27 11:38

    Don't do this. If you want to have a dynamic group of items pointed to by names, that's what a dict is for. If you just want an list of items in a particular order, that's what a list is for.

    Variable names should be kept to what you, the programmer, actually write in your code. Down the other path lies madness.

提交回复
热议问题