Print the days in a week except for Sunday

In this program, we will print the days in a week except for Sunday.

Steps to solve the program
  1. Take a list of days as input.
  2. Use for loop to iterate over each day in the list.
  3. If the iterated day is not Sunday then print the day.
  4. 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 
				
			

Print numbers from 1-10 except 5,6 using a while loop

find the total number of special characters in a string

Leave a Comment