Skip to main content

Python implementation of a default List using linked list

Project description

My_List

Implementation of Lists data type using Linked Lists

Usage

from list import List

# Initialize an empty list
myList = List()

# Initialize the list with values provided
myList = List([1, 2, 3])

# append Values to the list
myList.append(1)
myList.append(2)
myList.append(3)

# remove and return element from end of list
myList.pop()

# remove and return element from index of 3
myList.pop(3)

# return list length
myList.count()

# return list length
len(myList)

# return a copy of the list in this object format
myList.copy()

# return a copy of the list in default python list format
myList.to_list()

# extend a list using values from another list
myList.extend([1, 2, 3])
# extend list using the custom list object
myList.extend(otherList.copy())

# insert values into list at a specific index
# syntax: myList.insert(index, value)
myList.insert(0, 1)

# remove a specific element from the list
myList.remove(3)

# get the lowest index where an element appears
myList.index(1)

# Return max value
myList.max()

# Return min Value
myList.min()

# delete all elements from list
myList.clear()

print(myList)

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

linkedpy-0.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

linkedpy-0.0.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: linkedpy-0.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for linkedpy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 64162742a4282801f4319064d3d2694f9ad5dc316f7d945bc03aa8e36cee59cd
MD5 ec457c85819940c7f90d2ccec5f335f2
BLAKE2b-256 1603183850669fa0836c1d78e829d69d6ae15aca3687731c08ca3f31ee2c826e

See more details on using hashes here.

File details

Details for the file linkedpy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: linkedpy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for linkedpy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47c1cffec43e39b7fd27bd471f53cc741e17208adb8197464e7d4085d68e44b3
MD5 020b23dafb39db9c5a14ccb02004ce6f
BLAKE2b-256 732d057a182553ce05618242a46d71008b10a76e245faa04773513baceb10a5f

See more details on using hashes here.

Supported by

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