Questions on LIST in Python

List in Python
  1. Declare one blank list and then add four items to it.
  2. Declare one list by using one integer , one float and two strings. After adding display 2nd element and check the data type of the list.
  3. Create one list by using output of a range. Example : your list should have all the numbers starting from 5 to less than 50 with increment of 5.
  4. Display all items of a list by looping
    for i in my_list:
  5. Display last item
  6. Display 2nd item from last
  7. All items starting from 0 till last
  8. All items starting from 1 till last
  9. All items starting from 2 to 4
  10. Create one list with names of your five friends. Return the position of your best friend in the list.
  11. Add one name Alex to above list. ( append())
  12. Add name ‘Ronn’ to 2nd position ( insert()).
  13. Create two list and then merger 2nd list with first list and display the output ( extend() )
  14. Create a copy of your friends list
  15. Remove one element from the list ( specify the name )
  16. Remove the 2nd element from the list and display the removed element ( use pop() )
  17. Remove all the elements of a list.
  18. Create a list using names of your friends, then search for your best friend name inside the list ( use in )
  19. Find the total number of elements present in a list ( use len() )
  20. Find the number of time one particular element is present inside (use count() )
  21. Reverse the order of the list and then print
  22. Sort a list then print
  23. Create a list of your friends and sort them in the order of their length.
  24. In above list reverse the sorting order
  25. Create one list and remove duplicate elements from it.
  26. Find the sum of all elements of a list with integers as elements.
  27. Find the highest and lowest number of a list
  28. What is the difference between append() and insert() methods?
  29. What is the difference between append() and extend() methods?
  30. Take one input string and create one list by using all the chars of the string.
  31. In above list remove the duplicate chars
  32. Find the common elements between two lists.
Python- Multi dimensional List Matrix Multiplication without using built-in functions Python- List append

Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2023 All rights reserved worldwide Privacy Policy Disclaimer