PYTHON LISTS AND LIST FUNCTIONS

# grocery = ["sarso tel", "chawal", "dhaniya", "mirchi", "haldi", "podina", "saboon", "shampoo"]
# print(grocery[5])
# numbers = [105, 40, 50, 30, 25, 55, 90, 80]
# # numbers.sort()
# # numbers.reverse()
# print(numbers[::])
# numbers.append(94)
# numbers.pop()
# numbers.remove(30)
# numbers.insert(7,1010)
# print(numbers)

# mutable = can change, list is the mutable
# immutable = cannot change, tupple is the immutable
# tp = (23,)
# print(tp)
# a = 26
# b = 4
# a,b = b, a
# print(a, b)

Comments