Skip to main content

Stack FIFO and LIFO

Project description

This project is stack FIFO (First In - First Out) or LIFO (Last In - First Out)

Install

pip install stackFifoLifo

or

python setup.py

Example

>>> from stackFifoLifo import Fifo
>>> x=FifoStack()
>>> x.copyStack()
[]
>>> x.emptyStack()
True
>>> x.stack('A')
>>> x.stack(5)
>>> x.stack(['toto','tata','titi'])
>>> x.copyStack()
[['toto', 'tata', 'titi'], 5, 'A']
>>> z=x.unstack()
>>> z
'A'
>>> x.copyStack()
[['toto', 'tata', 'titi'], 5]
>>> x.size()
2
>>> x.element()
5
>>> x.copyStack()
[['toto', 'tata', 'titi'], 5]

This project is inspired by [mesrecettespython](http://python.jpvweb.com/mesrecettespython/doku.php?id=gestion_piles). Thanks to Tyrtamos.

Project details


Release history Release notifications

This version

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for stackFifoLifo, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size stackFifoLifo-0.0.1.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page