In this program, we will print the days in a week except for Sunday.
Steps to solve the program
- Take a list of days as input.
- Use for loop to iterate over each day in the list.
- If the iterated day is not Sunday then print the day.
- use the If statement for this purpose.
days = ["Sunday","Monday","Tuesday","Wednesday","Thursday"
,"Friday","Saturday"]
for day in days:
if day != "Sunday":
print(day, end=" ")
Output :
Monday Tuesday Wednesday Thursday Friday Saturday