List methods in Python

#----------------------------- 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)  

Join our team, where career growth knows no limits.

For More Details

Our internship program guarantees personalized attention for optimal career development in the tech industry.

+91 97879 68375

-> You should bring your own laptop during the internship

Who can apply?

Internships are open for students who: B.E / B.Tech / M.E / M.Tech / B.Sc / M.Sc / M.C.A / B.C.A / Diploma.

  • Ongoing Students Only
  • days, 5days/ 10days or Based on Student Preference
  • Limited 1 to 10 students per slot
  • Registration fees : 1000 INR
  • Slots are filling quickly only fewer slots are available