Beginner’s Guide to Python

Beginners Guide to Python 3 – Python Set

Python Set Python set is an unordered collection of unique items. They are commonly used for computing mathematical operations such as union, intersection, difference, and symmetric difference. The important properties of Python sets are as follows: Sets are unordered – Items stored in a set aren’t kept in any particular order. Set items are unique – Duplicate …

Beginners Guide to Python 3 – Python List Comprehension

Python List Comprehension A comprehension is a compact way of creating a Python data structure from iterators. With comprehensions, you can combine loops and conditional tests with a less verbose syntax. Comprehension is considered more Pythonic and often useful in a variety of scenarios. What is List Comprehension? List comprehension sounds complex but it really isn’t. List …

Beginners Guide to Python 3 – Python Nested List

Python Nested List A list can contain any sort object, even another list (sublist), which in turn can contain sublists themselves, and so on. This is known as nested list. You can use them to arrange data into hierarchical structures. Create a Nested List A nested list is created by placing a comma-separated sequence of sublists. L = …

Beginners Guide to Python 3 – Python Operators

Python Operators Operators are used to perform operations on values and variables. The Python operators are classified into seven different categories: Arithmetic operators Assignment operators Comparison operators Logical operators Identity operators Membership operators Bitwise operators   Arithmetic Operators Arithmetic operators are used to perform simple mathematical operations on numeric values (except complex). Operator Meaning Example + Addition …