PYTHON LIST PRACTICE QUESTIONS (BASIC TO ADVANCED)
BASIC LEVEL
1. Create a list and print all elements.
2. Take 5 numbers as input and store them in a list.
3. Find the length of a list.
4. Access the first and last element.
5. Append a number.
6. Insert at index 2.
7. Remove a specific element.
8. Pop the last element.
9. Check if an element exists.
10. Count occurrences.
11. Reverse using slicing.
12. Reverse using reverse().
13. List of squares 1–10.
14. Print even numbers.
15. Sum of elements.
16. Find max and min.
17. Sort ascending.
18. Sort descending.
19. Convert "apple" to list.
20. Join list of strings.
INTERMEDIATE LEVEL
21. Second largest number.
22. Remove duplicates.
23. Replace element at index.
24. Merge lists (without +).
25. Merge lists (with +).
26. Separate even/odd.
27. Check palindrome list.
28. Count strings > length 5.
29. Squares of even numbers.
30. Common elements.
31. Remove all occurrences.
32. Frequency using dict.
33. Print elements with index.
34. List of factorials.
35. Right shift elements by 1.
36. Product of list elements.
37. Index of all occurrences.
38. Flatten nested list.
39. Rotate list by k.
40. Convert list to set.
41. Difference of two lists.
42. Extract integers from mixed list.
ADVANCED LEVEL
43. Kth smallest number.
44. Kth largest number.
45. Remove duplicates (keep order).
46. Find repeated elements.
47. All pair combinations.
48. Increase salaries by 10%.
49. Longest string.
50. Shift zeros to end.
51. Flatten nested lists (logic).
52. Extract primes.
53. Chunk list into size k.
54. Max-min difference.
55. Replace negative numbers.
56. Cumulative sum.
57. Generate all sublists.
58. Pair sum equals target.
59. Bubble sort.
60. Selection sort.
61. Remove consecutive duplicates.
62. Top 3 largest numbers.
63. Partition even/odd.
64. Grade assignment from marks.
65. Convert list to 3x3 matrix.
66. Check permutation equality.
67. Frequency table without libs.
68. Unique sorted elements.
69. Dot product of lists.
70. Chunk list into uneven groups.