The arraytopythonlist( function converts a panorama array into a Python list.
Parameters
This function has two parameters:
array – the array to convert.
separator – the separator character.
Description
This function converts a Panorama array into a Python list.
arraytopythonlist("red/green/blue","/") ☞ ['''red''','''green''','''blue''']
To use this in python code use
^«arraytopythonlist(formula,sep)»^
for example:
mylist = ^«arraytopythonlist(Colors,cr())»^
Note the use of ^
instead of $
.
See Text Arrays for more information about arrays.
Note: This function is equivalent to:
"["+replace(arrayfilter(thearray,thesep,||| pythonconstant(import()) |||),thesep,",")+"]"
See Also
History
Version | Status | Notes |
10.0 | No Change | Carried over from Panorama 6.0. |