You could create names on the fly.
Better is to use the right data structure for it.
globals()['my_variable'] = 42But this is not Pythonic. (ugly code)
Better is to use the right data structure for it.
my_dict = {} my_dict['my_list1'] = list(range(1, 11)) my_dict['my_list2'] = list(range(11, 21)) print(my_dict)
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!