The Tech Platform
Dec 14, 20211 min
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:
The Tech Platform