13. Problem to print the list in reverse order using while loop

In this program, we will take a user input as a list & print the list in reverse order using a while loop with the help of the below-given steps.

List in reverse order:

Steps to solve the program
  1. Take a list as input.
  2. With the help of the While loop print the given list in the reverse order by using the necessary condition.
				
					#Input list
list1 = [1,2,3,4,5,6]

#Creating variable
count = len(a)-1

while count >= 0:
    #Printing output
    print(value[count], end=" ")
    count -= 1
				
			

Output :

				
					6 5 4 3 2 1 
				
			

Related Articles

List in the reverse order using for loop

List in reverse order using index slicing

Leave a Comment