C#如何使用PythonTuple类型
示例代码:
new PythonTuple(new[] { 1, 2, 3 });
PythonTuple myTuple = PythonOps.MakeTuple(new object[] { 1, 2, 3 });
// IronPython.Runtime.List
List list = new List();
list.Add(1);
list.Add(2);
list.Add(3);
PythonTuple tuple = new PythonTuple(list);
foreach (int i in tuple)
{
Console.WriteLine("Tuple item: {0}", i);
}

浙公网安备 33010602011771号