python-small-examples

@author jackzhenguo
@desc 
@date 2019/3/4

32 转元组

tuple() 将对象转为一个不可变的序列类型

 In [16]: i_am_list = [1,3,5]
 In [17]: i_am_tuple = tuple(i_am_list)
 In [18]: i_am_tuple
 Out[18]: (1, 3, 5)
[上一个例子](/python-small-examples/md/31.html) [下一个例子](/python-small-examples/md/33.html)