list
- it is equivalent to array
- list is created using [ ] and after a very element , should be written
- in python we can store different types of data
- strings are immutable and list are mutable
- program for list
🔹 General slicing syntax
sequence[start : stop : step]
- start → index to begin (included)
- stop → index to end (excluded)
- step → jump value (optional)
List slicing
- similar to string slicing
- syntax for list slicing { list_name[ starting_idx : ending_idx ]
program for list slicing
# list program
marks = [2,3,4,5,6,7]
print(marks[1 : 3])
list methods

list = [43,3,45,5]
list.append(7)
print(list)
list.sort()
print(list)
list.sort(reverse=True)
print(list)
list.reverse()
print(list)