I have a list that contains one or many items:
fruits = ['apple', 'orange', 'pear'] #or could be one or many
I want to create variables depending on the number of items: Code:
for i in range(len(fruits)):
"Fruit".format(i) = fruits[i]
I want to obtain as:
Fruit1=apple, Fruit2=orange, Fruit3=pear
Any help how I can get this?