Output = ['1)', 'JP', '*00000.0000/UNT', 0.07704, 61628.21, '0%(E)', 0.0, 'ND']
I have split my list item as above and would like to assign each value into separate variable something like below:
var1 = '1)' var2 = 'JP' .......
How can I accomplish it using for loop without need to manually specify how many variables are needed. In my example contains only 7 values, but in reality it could be less or more.
Output[0],Output[1],Output[2]and so on, but these are not descriptive. You would need to know what each list element means and then associate a name with each using a dictionary. (With this many elements, separate variables is not all that helpful, unless you had maybe 3 or less and this list itself was local to a small function.) The link from @alani is very appropriate here.