Lists in Python
A built-in data type that stores set of values
e
It can store elements of different types (integer, float, str
lleg
Co
marks = [87, 64, 33, 95, 76] #marks[0], marks[1]
pna
A
student = [”Karan”, 85, “Delhi”] #student[0], student
, List Slicing
Similar to String Slicing
ge
list_name[ starting_idx : ending_idx ] #ending id
olle
C
marks = [87, 64, 33, 95, 76]
pna
marks[ 1 : 4 ] is [64, 33, 95]
A
marks[ : 4 ] is same as marks[ 0 : 4]
A built-in data type that stores set of values
e
It can store elements of different types (integer, float, str
lleg
Co
marks = [87, 64, 33, 95, 76] #marks[0], marks[1]
pna
A
student = [”Karan”, 85, “Delhi”] #student[0], student
, List Slicing
Similar to String Slicing
ge
list_name[ starting_idx : ending_idx ] #ending id
olle
C
marks = [87, 64, 33, 95, 76]
pna
marks[ 1 : 4 ] is [64, 33, 95]
A
marks[ : 4 ] is same as marks[ 0 : 4]