1for i in range(0, 9):
2 globals()[f"my_variable{i}"] = f"Hello from variable number {i}!"
3
4
5print(my_variable3)
6# Hello from variable number 3!
1for x in range(0, 9):
2 globals()['string%s' % x] = 'Hello'
3# string0 = 'Hello', string1 = 'Hello' ... string8 = 'Hello'