Parse String Input to Data List?

Hi, I’m trying to paste a list of points outside Dynamo as input,
but since there is not list or code block input,
the only way I could think of was to use String,
but how can I convert those String data into List?

Thanks in advance :]

Why can’t you paste your list into a code block / where is your data from?

Hi @zefreestijl something maybe,

2 Likes

Hi, Cuz I want to paste data as input into Dynamo Player…

Hi, Thanks for the solution, this looks promising, I’ll give it a try, thank you!

Not to compete, just to train in python, it’s not yet optimal (sweet understatement)

Python Script
import sys
a=IN[0]
b=a.replace('[','').replace(']','').split(',')
c=[float(i) for i in b]
OUT = [c[n:n+3] for n in range(0,len(c),3)]

cordially
christian.stan

2 Likes

can be done with some regex as well :wink:

1 Like