I have a list of numbers which I have in the following way (numbers are only an example):
list = '1, 2, 3, 4, 5'
I need them in an index format, so I do the following:
format = [list]
I now get it the following way:
['1, 2, 3, 4, 5']
However, I need it this way:
[1, 2, 3, 4, 5]
Can you tell me how to do that?
Thank you so much in advance!
Try the split function this way:
It will display :
PS : You should avoid having a variable called list. As it is a type of variable, it can cause serious issues