Skip to content

Commit

Permalink
Added first test of example
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAihopGG committed Jun 4, 2024
1 parent 0bd9770 commit 6452084
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions examples/ustack_in_using.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Getting started
To start, install ufpy lib by command
### Windows
pip install ufpy
### Linux


## Examples
To create stack, use UStack class.
stack = UStack()
To add an element to the stack, use UStack.append([<element1>, <elementN, ...])
stack.append(1, 2, 3, 4, 5)
To get the top element, use UStack.top()
print(stack.top())
# 5
To get and remove the top element of the stack, use UStack.pop()
print(stack.pop())
# 5
print(stack.top())
# 4
## All methods
| Name | Args |
| ------- | ------- |
| top | null |
| append | **items |
| pop | null |

0 comments on commit 6452084

Please sign in to comment.