How Tuple Python code library add an element of append

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/iCloudEnd/article/details/99498456

How Tuple Python code base of append elements

Unlike array tuple provides us append function, we can add the following way

t=[1,3,4,5]                                                             
k=() 
for item in t: 
    k=k+(item,) 

More exciting please pay attention to my column Code

Guess you like

Origin blog.csdn.net/iCloudEnd/article/details/99498456