Python - efficient way to create 20 variables?
问题 I need to create 20 variables in Python. That variables are all needed, they should initially be empty strings and the empty strings will later be replaced with other strings. I cann not create the variables as needed when they are needed because I also have some if/else statements that need to check whether the variables are still empty or already equal to other strings. Instead of writing variable_a = '' variable_b = '' .... I thought at something like list = ['a', 'b'] for item in list: