I am taking lines from a .txt file and for each line I want to create a Global Variable so I can use it in threads.
For example - File contains these 3 words:
walk
fast
now
I want to make a loop where I can create global variable with name and value like this:
global_var1 = walk
global_var2 = fast
global_var3 = now
P.S- I don't want to use database and I need it dynamic, I don't want to define how many words are in the file. I am creating variables according to the number of words dynamically.
I thought about using a list but list is not available in threads. I wanted to use 1 list in several threads but that's not possible it seems.
Any help will be appreciated.