Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python Dynamic Create var

for i in range(0, 9):
    globals()[f"my_variable{i}"] = f"Hello from variable number {i}!"

print(my_variable3)
 
PREVIOUS NEXT
Tagged: #Python #Dynamic #Create #var
ADD COMMENT
Topic
Name
7+1 =