Code Genic is a blog which provides the codes for the daily life uses. All the codes are mostly for college related Projects or Lab work.
Sunday, March 3, 2019
Reverse the elements - Python3
a=[] n=int(input("Enter the size of list:")) for i in range(n) : x=int(input("Enter the value: ")) a.append(x); print(a) a.reverse() print("Reversed list:" +str(a))
No comments:
Post a Comment