[Copy] [list] [demo Python experimental practice examples [12]]

 

# ! / Usr / bin / Python 
# encoding = UTF-. 8 
# - * - Coding: UTF-. 8 - * - 

# a list of copied into another list; 
# Analysis: use [:] 
L = [0, 3,2,1,0.3 ] 
L = L [:]
 Print (L) 



# or used for loop iteration: 

L = [0,3,2,1,0.3 ] 
LL = []
 for I in Range (len (L )): 
    ll.append (L [I]) 


Print ( " LL " , LL)

 

 


-------- (I am dividing line) --------

reference:

1. RUNOOB.COM:https://www.runoob.com/python/python-exercise-example7.html

 

 

Remarks:

Initial modified: September 24, 2019 19:57:37

Environment: Windows 7 / Python 3.7.2

Guess you like

Origin www.cnblogs.com/kaixin2018/p/11580596.html