diff --git a/ReverseList.py b/ReverseList.py new file mode 100644 index 0000000..903e6d3 --- /dev/null +++ b/ReverseList.py @@ -0,0 +1,13 @@ + +# input list +lst = [10, 11, 12, 13, 14, 15] +# the above input can also be given as +# lst=list(map(int,input().split())) +l = [] # empty list + +# iterate to reverse the list +for i in lst: + # reversing the list + l.insert(0, i) +# printing result +print(l)