Skip to content

Commit 2c54049

Browse files
committed
Added comments
1 parent ed2ca44 commit 2c54049

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lab-11/stack.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ def __init__(self):
55

66

77
def getStack(self):
8+
"""Prompts the user to enter five strings and stores them in a stack."""
89
for i in range(5):
910
self.stack.append(input(f"Enter string {i + 1} out of 5: "))
1011

1112
def reverseStack(self):
13+
"""Reverses the order of the stack and displays it."""
1214
for i in range(1, 6):
1315
print(self.stack[-i])
1416

0 commit comments

Comments
 (0)