top of page
Writer's pictureThe Tech Platform

Program to Reverse a List in Python

Updated: Dec 16, 2021

This python program allows user to enter the length of a List.


Code:

NumList = []

Number = int(input("Total Number of List Elements: "))
for i in range(1, Number + 1):
    value = int(input("Element %d : " %i))
    NumList.append(value)

NumList.reverse()
print("\nThe Result of a Reverse List =  ", NumList)

Output:





Read More:



The Tech Platform

0 comments

Comments


bottom of page