示例代码:

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);
}

 

相关文章:

  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2019-01-18
  • 2021-07-12
猜你喜欢
  • 2021-06-15
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
相关资源
相似解决方案