list() and tuple() : Convert to Tuple : Tuple PYTHON TUTORIALS


PYTHON TUTORIALS » Tuple » Convert to Tuple »

 

list() and tuple()


aList = ['tao', 9399'time']
aTuple = tuple(aList)
print aList, aTuple
aList == aTuple
anotherList = list(aTuple)
aList == anotherList
print aList is anotherList
print [id(xfor x in aList, aTuple, anotherList]



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Tuple
» Convert to Tuple