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


Download files

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

Source Distribution

stackFifoLifo-0.0.1.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file stackFifoLifo-0.0.1.tar.gz.

File metadata

  • Download URL: stackFifoLifo-0.0.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for stackFifoLifo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d592380610fa615e371ba625ae5acf001a099aa373a1178b4de6b75e89630ee9
MD5 9a4e5aef20d7cbef8131793be9067d18
BLAKE2b-256 1409c240988193afad488e77f78cb3d93456f404485dc77e7c4297b1f0264e2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page