Skip to content

Instantly share code, notes, and snippets.

@chenlola
Created March 19, 2018 21:31
Show Gist options
  • Save chenlola/c83b7ea4802a89bc581b9d520b1dc2ea to your computer and use it in GitHub Desktop.
Save chenlola/c83b7ea4802a89bc581b9d520b1dc2ea to your computer and use it in GitHub Desktop.
Python List control With [ : ]
aList=[1,1,1]
bList=[2,2,2]
cList=[3,3,3]
_________________
List1 = aList
List1.append(0)
_________________
#Different of:
aList[:]=cList #Does not change aList direct list
aList = cList #Change aList in the Global frame direct in to object of cList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment