- 论坛徽章:
- 0
|
In IP, you can use dotnet list and generic list and Python list
1: Access dotnet Array in IP:
import clr
from System.Collections import *
donet_list = ArrayList( [1, 2, 3, 4] ) #init with python list
for e in donet_list:
print e
2: Access Python List:
py_list = [ 1, 2, 3, 4 ]
for e in py_list:
print 3
3: Acess dotnet generics list
from System.Collections.Generic import List
g_list = List[int]( [ 1, 2, 3, 4] )
for e in g_list:
print e
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/6123/showart_1718459.html |
|