Py-linkedlist
Work with linkedlists datastructure in Python
Installation
pip install py-linkedlist
Import Package
# Importing linkedlist to your code
from linkedlist import linkedlist
Creating First Linkedlist
Initialising a linkedlist
l_list = linkedlist()
Adding Elements in the Linkedlist
#Adding First element to the linkedlist
l_list.add(10)
# Appending a list to the linkedlist
l_list.add([1, 2])
# Appending a tuple to the linkedlist
l_list.add((3, 4, 3))
# Adding new element at head position in linkedlist
l_list.addAtHead(20)
Any data type including String, Dictonary, Sets etc. can be added to linkedlist
Printing the Linkedlist
# Priting the linkedlist to console
l_list.show()
output: 20->10->1->2->3->4->3
Get Linkedlist length
# Returns length of linkedlist
print(l_list.length())
output: 7
Deleting Linkedlist elements
# Remove first occurance of an element (3)
# l_list: 20->10->1->2->3->4->3
l_list.removeElement(3)
l_list.show()
output: 20->10->1->2->4->3
# Remove using element position
# l_list: 20->10->1->2->4->3
l_list.removeAtLoc(2)
l_list.show()
output: 20->1->2->4->3
# Remove Head/First element in linkedlist
# l_list: 20->1->2->4->3
l_list.removeHead()
l_list.show()
output: 1->2->4->3
# Remove Tail/Last element in linkedlist
# l_list: 1->2->4->3
l_list.removeTail()
l_list.show()
output: 1->2->4
# Remove All elements in linkedlist
# l_list: 1->2->4->3
l_list.removeAll()
l_list.show()
output: None
Checking Linkedlist is Empty/Not
# Checking the linkedlist is Empty/Not
print(l_list.isEmpty())
output: True
Indexing Linkedlist element with location
# Get Linkedlist with location. Linkedlist are zero-indexed based
l_list.add((13, 41, 34))
print(l_list.eleAt(2))
output: 34
Uninstall Package
pip uninstall py-linkedlist
Metadata
Release files for py-linkedlist 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_linkedlist-0.0.12.tar.gz | 3.4 kB | Without provenance | Details for py_linkedlist-0.0.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_linkedlist-0.0.12-py3-none-any.whl | Python 3 | none | any | Details for py_linkedlist-0.0.12-py3-none-any.whl |
Total release size: 6.7 kB
Release files / py_linkedlist-0.0.12.tar.gz
| Download URL | py_linkedlist-0.0.12.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aaf4e8b84a349c21f9b8939c67ca7c05cbc666417ca6c4722f28a6722644ecbf
|
|
BLAKE2b-256 checksum How to use checksums |
0cd6dd338c89336cdff279992b0a874424e9f5e0cc7f62947809903579fdd7a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Release files / py_linkedlist-0.0.12-py3-none-any.whl
| Download URL | py_linkedlist-0.0.12-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f698f72923be7ba9cdd83bf1b7067784c0f0c9179965e8b53cb768f06fd9e02e
|
|
BLAKE2b-256 checksum How to use checksums |
fc2e761a22bbe2f676de1affa1c1b26f3d65984aa87989f0f6f065163977991c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Security for py-linkedlist 0.0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.