Skip to content

Commit

Permalink
Basic
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjanaPurbia authored Aug 29, 2021
1 parent 80f5c7c commit 0f157f5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions stack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
def stack(num):
my_data = []
for i in range(num):
numb = int(input("Enter entries:-->"))
my_data.append(numb)
if len(my_data) == 1:
return my_data
else:
return my_data



number = int(input("Enter number of Stack:-"))
my_data_1 = stack(number)
for i in range(len(my_data_1),0,-1):
print(my_data_1[i-1])

0 comments on commit 0f157f5

Please sign in to comment.