Berry - convert string to a list #20751
-
Hi, Anybody knows how to convert a string to a list in berry?. I am using this code (bottom), but it should be a easier way (list to string is simply "tostring()"). I also tried to convert with list (), same style than number() ... but it does not work (even using the same string generated by tostring()). def stringToList(list_str) [Edit] The conversions that I get with list() simply take the list as one single string element
Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Well, the conversion depends on exactly how the string can be, but your code looks like it can be JSON-like. Hence:
To create a suitable string from more than a simple list of numbers, I can recommend using You added more stuff while I was typing, but how |
Beta Was this translation helpful? Give feedback.
Yes... that is what I am thinking... I was checking and the measurements start second 50/51, then it should be easy to calculate the moment to launch json_append.
Thank you a lot.