Python While Loop Questions (List Data Type)
1. Print all elements of a list using a while loop.
2. Print only even numbers from a list using a while loop.
3. Print list elements in reverse using a while loop.
4. Find the sum of all elements in a list using a while loop.
5. Count how many odd numbers are in the list using while.
6. Find the maximum element in a list using a while loop.
7. Create a new list with squares of elements using while.
8. Remove all duplicates from a list using a while loop.
9. Copy all positive numbers to a new list using a while loop.
10. Find the index of a given element using a while loop.
11. Count how many times a specific element appears in the list.
12. Replace all negative numbers in a list with zero using a while loop.
13. Separate even and odd numbers into two new lists using while.
14. Shift all elements one position to the right using a while loop.
15. Merge two lists manually using a while loop.
16. Print every second element of the list using while.
17. Insert a specific value after each even number using while.
18. Delete all elements one by one from the list using a while loop.
19. Swap the first and last element of the list using a while loop.
20. Create a list without using list comprehension or for loop, only while.