Day 7: ------- List QUESTIONS(Theory) ---------------------- 1.What is list? 2.How to remove the values from list? 3.What is the difference between append( ) and extend( )? 4.How to find the length of list? 5.What are the methods present in list? 6.Is Negative indexing in list possible or not? 7.How to delete or remove elements from a list? 8.How to change or add elements to a list? 9.How to slice lists in Python? 10.How to access elements from a list? 11.What is difference between pop() and delete()? 12.What are ways used for removing all values from list? 13.What is the difference between sort() and Sorted()? 14.Write a ways to sort values in descending order? 15.Is posible to check whether value is present or not? QUESTIONS(Practical) ----------------------------------------------- QUESTION 1: ------------------ Description : Create a new list with values and find the length of it Input : List = 10,20,30,90,10,10,40,50 QUESTION 2: ------------------ Description : Create a new list with values and find the length of it Input : List = 105,205,305,405,505,605,705,805 QUESTION 3: ------------------ Description : Create a new list with values and find the length of it Input : List = 'Java','Python','Selenium','java',10,20,10 QUESTION 4: ------------------ QUESTION 4.1: -------------------- Description : Get the index value of 10 Input: List = 10,20,30,90,10,50 QUESTION 4.2: -------------------- Description : Get the last index value of 10 Input: List = 10,20,30,90,10,10,40,50 QUESTION 4.3: -------------------- Description : Get the index value of 50 Input: List = 10,20,30,90,10,10,40,50 QUESTION 4.4: -------------------- Description : Get the index value of 90 Input: List = 10,20,30,90,10,10,40,50 QUESTION 4.5: -------------------- Description : Get the each index value of 10 present in below list Input: List = 10,20,30,90,10,10,40,50,10 QUESTION 4.6: -------------------- Description : Get the index value of 70 present in below list Input: List = 10,20,30,90,10,10,40,50,10 QUESTION 4.7: -------------------- Description : Add a value [100,200,300] at the last position of list and find index value of 200 Input : List = 10,20,30,90,10,10,40,50,[100,200,300] QUESTION 4.8: -------------------- Description : Add a value [100,200,300] at the last position of list and find index value of 200 Input : List = 10,20,30,90,10,10,40,50,100,200,300 QUESTION 5: ------------------ QUESTION 5.1: -------------------- Description : Get the value present at 2nd index Input: List = 10,20,30,40,50,60 QUESTION 5.2: -------------------- Description : Get the value present at 4th index Input: List = 100,200,300,400,500,600,700 QUESTION 5.3: -------------------- Description : Get the value present at -2nd index Input: List = 105,205,305,405,505,605,705,805 QUESTION 5.4: -------------------- Description : Get the value present at -10th index Input: List = 105,205,305,405,505,605,705,805 QUESTION 6: ------------------ QUESTION 6.1: -------------------- Description : Remove the value present at 2nd index and print the removed value Input: List = 10,20,30,40,50,60 QUESTION 6.2: -------------------- Description : Remove the value present at 10th index Input: List = 10,20,30,90,10,10,40 QUESTION 6.3: -------------------- Description : Remove the last value of 10 present in the list Input: List = 10,20,30,90,10,10,40 QUESTION 6.4: -------------------- Description : Remove the last value present in the list Input: List = 10,20,30,90,10,10,40 QUESTION 6.5: -------------------- Description : Remove the value 80 present in the list Input: List = 10,20,30,90,10,10,40,60,80,100 QUESTION 6.6: -------------------- Description : Remove the value 50 present in the list Input: List = 10,20,30,90,10,10,40,60,80,100 QUESTION 6.7: -------------------- Description : delete the value present in (-5th to -1st) index in the list Input: List = 10,20,30,90,10,10,40,60,80,100 QUESTION 6.8: -------------------- Description : delete the value present in (2nd to last) index in the list Input: List = 10,20,30,90,10,10,40,60,80,100 QUESTION 6.9: -------------------- Description : clear all the value present in the list Input: List = 10,20,30,90,10,10,40,60,80,100 QUESTION 7: ------------------ QUESTION 7.1: -------------------- Description : Replace the value 300 into 350 in the list Input : List = 100,200,300,400,500,600,700 QUESTION 7.2: -------------------- Description : Replace the value present in 7th index as 90 Input: List = 10,20,30,90,10,10,40,50,10 QUESTION 7.3: --------------------- Description : Replace the 10 into 100 in List Input: List = 10,20,30,90,10,10,40,50,30 Output: List = 100,20,30,90,100,100,40,50,30 QUESTION 8: ------------------ QUESTION 8.1: --------------------- Description : Add a value 50 in the 2nd index and display the list after adding. Input : List = 10,20,30,90,10,10,40,50 QUESTION 8.2: --------------------- Description : Add a value 70 at the end of the list Input : List = 10,20,30,90,10,10,40,50 QUESTION 8.3: -------------------- Description : Add a value 80 at the 30th index of list Input : List = 10,20,30,90,10,10,40,50 QUESTION 8.4: -------------------- Description : Add a value 100 at the last index of 10 in the list Input : List = 10,20,30,90,10,10,40,50 QUESTION 9: ------------------- QUESTION 9.1: --------------------- Description : Add a value 100,200,300 at the last position of list Input : List = 10,20,30,90,10,10,40,50 QUESTION 9.2: --------------------- Description : Add a value [100,200,300] at the last position of list Input : List = 10,20,30,90,10,10,40,50 Output : List = 10,20,30,90,10,10,40,50,[100,200,300] QUESTION 10: ------------------ Description : Add a value [100,200,300] at the last position of list Input : List = 10,20,30,90,10,10,40,50 Output : List = 10,20,30,90,10,10,40,50,100,200,300 QUESTION 10: ------------------ QUESTION 10.1: ---------------------- Description : count the 10 value present in the list Input : List = 10,20,30,90,10,10,40,50 QUESTION 10.2: ---------------------- Description : find the maximum value in the list Input : List = 10,20,30,90,10,10,40,50 QUESTION 10.3: ---------------------- Description : find the maximum value in the list Input : List = 'java','python','selenium','Java','Python','Selenium' QUESTION 10.4: ---------------------- Description : find the minimum value in the list Input : List = 10,20,30,90,10,10,40,50 QUESTION 10.5: ---------------------- Description : find the minimum value in the list Input : List = 'java','python','selenium','Java','Python','Selenium' QUESTION 11: ---------------------- QUESTION 11.1: ---------------------- Description : Reverse the values present in list Input : List = 10,20,30,50,90,40,100,60,10,70 QUESTION 11.2: ---------------------- Description : Sort the values (Ascending &Descending ) order present in list Input : List = 10,20,30,50,90,40,100,60,10,70 QUESTION 12: ------------------- QUESTION 12.1: ---------------------- Description : Copy the values in list Input : List = 10,20,30,90,10,10,40,50 QUESTION 12.2: ---------------------- Description : Create a lists with values and compare the two list Input : List = 10,20,30,90,10,10,40,50 Input : List = 30,40,50,60,80 QUESTION 12.3: ---------------------- Description : Create a lists with values and compare the two list Input : List = 10,20,30,90,10,10,40,50 Input : List = 10,20,30,90,10,10,40,50 QUESTION 13: -------------------- QUESTION 13.1: --------------------- Description : Get the each value of list by using for loop Input: List = 105,205,305,405,505,605,705,805 QUESTION 13.2: ---------------------- Description : Get the each value of list by using Enumarate for loop Input: List = 105,205,305,405,505,605,705,805 QUESTION 13.3: ---------------------- Description : Get the each value of list by using Enumarate for loop and print only odd index value Input: List = 105,205,305,405,505,605,705,805