Lesson 17-Range Function and List Assignments: Range - Powerful Sequence Generator
Lesson 17-Range Function and List Assignments: Range - Powerful Sequence Generator
List assignments
Range() powerful sequence generator
Range(0,5) 0,1,2,3,4
To do this, the index value(the location) of each element must be used to update
each grade value
Handling Lists
In python, if we assign a variable list:
List2 = List1
Each variable ends up referring to the same instance of the list in memory
List1 = [10,20,30,40,50]
List2 = list1
List1[0] = 5
List1 = [5,20,30,40,50] change made in list1
List2 = [5,20,30,40,50] change in list1 caused
Python is jewish it likes to save memory