I tried using the list method, List.copy () and list.clear () and it wasn’t working. Could anybody help me?
Can you tell us what the goal of the script is? Here is a working version where you don’t need to copy the list or clear it, as it will reset to an empty list at the start of each iteration.
# The inputs to this node will be stored as a list in the IN variables. listas = IN l =  output =  for lista in listas: l1 =  for n in lista: if n is None: n = 0 l1.append(n) l1.sort() l.append(l1) for lista in l: output.append(lista[-1]) OUT = output
Python 2.7 lists do not have a copy method. You can either create a copy using object slice syntax or by importing the copy module.
import sys sys.path.append(r'C:\Program Files (x86)\IronPython 2.7\Lib') import copy list_in = IN list_copy = copy.copy(list_in) list_slice = list_in[:] OUT = list_copy, list_slice
Thanks man, it worked!!
Thanks man, could i import python library?
You can import most standard python modules contained in IronPython’s Lib folder after you have added it to your PATH:
import sys sys.path.append(r'C:\Program Files (x86)\IronPython 2.7\Lib')
Then you can import other standard modules like
StringIO, etc. Modules written in C (
scipy) cannot be imported.