Python Set Comprehension

python set comprehension

Python set comprehension is very similar to list comprehension. In set comprehension, curly braces are used, while in list comprehension, square brackets are used.

Tuples in Python Programming

Tuples in python

Tuples in Python, also known as immutable lists, are ordered sequences of items. Like lists, tuples are made up of items separated by commas. However, unlike the lists, items are enclosed in parentheses instead of square brackets.

Python Stacks and Queues

lists stacks queues

Essentially, python does not have stack and queues like programming languages like Java. In this post, we will be exploring the implementation of Python stack and queues using the collections library.

List in Python

list in python

A list in Python is an ordered sequence of objects or data. It comprises data items or elements separated by commas and enclosed within a squared bracket.