Python Linked List Last Updated : 19 Sep, 2025 Comments Improve Suggest changes Like Article Like Report A linked list is a type of linear data structure similar to arrays. It is a collection of nodes that are linked with each other. A node contains two things first is data and second is a link that connects it with another node. Below is an example of a linked list with four nodes and each node contains character data and a link to another node. Our first node is where head points and we can access all the elements of the linked list using the head.Creating a Node ClassWe have created a Node class in which we have defined a __init__ function to initialize the node with the data passed as an argument and a reference with None because if we have only one node then there is nothing in its reference. Python class Node: def __init__(self, data): self.data = data self.next = None Implementation of Simple Linked ListExample: Below is a simple example to create a singly linked list with three nodes containing integer data. Python class Node: def __init__(self, data): self.data = data self.next = None # Create nodes node1 = Node(15) node2 = Node(3) node3 = Node(17) node4 = Node(90) # Link nodes node1.next = node2 node2.next = node3 node3.next = node4 head = node1 # Head points to the first node # Traverse and print the linked list current = head while current: print(current.data, end=" -> ") current = current.next print("None") Output15 -> 3 -> 17 -> 90 -> None BasicsLinked lists come in different forms depending on how nodes are connected. Each type has its own advantages and is used based on problem requirements. The main types of linked lists are:Singly Linked ListDoubly Linked ListCircular Linked ListTo practice problems related to linked list, refer to this article Linked List Data Structure Comment More info S sagar99 Follow Improve Article Tags : Python Python-DSA Explore Python FundamentalsPython Introduction 3 min read Input and Output in Python 4 min read Python Variables 5 min read Python Operators 5 min read Python Keywords 2 min read Python Data Types 7 min read Conditional Statements in Python 3 min read Loops in Python - For, While and Nested Loops 6 min read Python Functions 5 min read Recursion in Python 4 min read Python Lambda Functions 5 min read Python Data StructuresPython String 5 min read Python Lists 4 min read Python Tuples 4 min read Python Dictionary 3 min read Python Sets 6 min read Python Arrays 7 min read List Comprehension in Python 4 min read Advanced PythonPython OOP Concepts 11 min read Python Exception Handling 5 min read File Handling in Python 4 min read Python Database Tutorial 4 min read Python MongoDB Tutorial 2 min read Python MySQL 9 min read Python Packages 12 min read Python Modules 7 min read Python DSA Libraries 15 min read List of Python GUI Library and Packages 3 min read Data Science with PythonNumPy Tutorial - Python Library 3 min read Pandas Tutorial 6 min read Matplotlib Tutorial 5 min read Python Seaborn Tutorial 15+ min read StatsModel Library- Tutorial 4 min read Learning Model Building in Scikit-learn 8 min read TensorFlow Tutorial 2 min read PyTorch Tutorial 6 min read Web Development with PythonFlask Tutorial 8 min read Django Tutorial | Learn Django Framework 7 min read Django ORM - Inserting, Updating & Deleting Data 4 min read Templating With Jinja2 in Flask 6 min read Django Templates 7 min read Python | Build a REST API using Flask 3 min read How to Create a basic API using Django Rest Framework ? 4 min read Python PracticePython Quiz 3 min read Python Coding Practice 1 min read Python Interview Questions and Answers 15+ min read Like