Python Practice › Loop Programs › Program 74
Days of the week except Sunday
Write a Python program to print the days of the week except Sunday using a while loop.
Output
Monday Tuesday Wednesday Thursday Friday Saturday
Approach
- Walk through a list with an index and skip “Sunday”.
Solution
days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]i = 0while i < len(days): if days[i] != "Sunday": print(days[i]) i += 1Output
Monday Tuesday Wednesday Thursday Friday Saturday
Learn the concept
New to this topic? Read the lesson, then come back.