#----------------------------- 1- min & max in list------------------------------
list = [1, 2, 3]
#minimum
minimum = min(list)
print("Minimum : ",minimum) # Output: 1
#maximum
maximum = max(list)
print("Maximum : ",maximum) # Output: 3
#----------------------------- 2- length in list------------------------------
list = ["web", "G", "app", "python"]
# Finding length
length = len(list)
print("Length : ",length) # Output: 3
#----------------------------- 3- clear in list------------------------------
list = ["Python ", "Intern", "@", "Madurai"]
# Clearing list
list.clear()
print("Final list :",list) # Output: []
#----------------------------- 4- copy in list------------------------------
list = ["Python ", "Intern", "@", "Madurai"]
new = list.copy() # moving list values to new list
print("Duplicate : ",new)
#----------------------------- 5- reverse in list------------------------------
list = ["Python ", "Intern", "@", "Madurai"]
# reversing the list
list.reverse()
print("Reversed list : ",list)
#----------------------------- 6- sort in list------------------------------
list = ["Python ", "Intern", "@", "Madurai"]
#sorting the list in ascending order
list.sort()
print("Sorted list",list)
#----------------------------- 7- pop in list------------------------------
list = [1, 2, 3, 9, 4]
# popping elements
num = int(input("Enter the index value to pop : "))
element = list.pop(num)
print("Popped @ index ",num," element : ",element)
#----------------------------- 8- remove in list------------------------------
list = ["Python ", "Intern", "@", "Madurai"]
# removing unwanted element
list.remove("@")
print("After removing : ",list)
#----------------------------- 9- insert in list------------------------------
list = [1, 2, 3, 89]
# inserting elements to list
list.insert(1, 49) # syntax : insert(index , value)
print(list) # Output: [1, 4, 2, 3]
#----------------------------- 10- slice in list------------------------------
list = ["W", "e", "b", "G", "a", "p", "p", "p"]
# slicing the list
subset = list[1:4]
print("Sliced list : ",subset)