String duplicates with list access GHpython

Hey all,

i wish to get 'pop" as a string item and split its with white space. However, in the code it duplicates the number of cycle due to the list access


item access and list access in GHpython.gh (9.3 KB)

Hello,

Does this work?

b=pop.split()

Also there is something funny about for x in list.
You shouldn’t have a variable called list, as that is a built in name.

Also pop is a method of the Python list class. Which although not breaking/overwriting things, might lead to smells (e.g. lol.pop(pop)).