Python Tutorial

Python Control Flow (If…Else)

Usually, you need to make some decisions in the flow of your program. These decisions are made using flow control statements that determine the...

Python Dictionary

Dictionaries are used to store key-value pairs in Python. Dictionaries are similar to lists, both store a collection of values. However, unlike lists, you...

Python Sets

In Python, a Set is an unordered collection of items. To define a Set, you should enclose items within curly braces {}. Each item in...

Python Tuples

Tuples are similar to lists with one distinction, tuples are immutable. Immutable means you cannot change items of a tuple (you cannot add new...

Python Lists

To store a collection of items in Python you can use Lists. Square brackets indicate a list, you can put list items between...

Python Numbers

In Python there are three types of numbers: Integer: Integer (or int) number type indicates a whole number.Float: If the number has a decimal portion,...

Python Strings

String is a commonly used data type in Python. It is simply a series of characters. To define a string literal in Python, you...

Python Operators

An operator is a symbol that performs an operation on values and variables. You can use the following operator types in Python: Arithmetic OperatorsComparison OperatorsAssignment...

Python Variables

Variables are used to store data (like string, integer or complex data) in memory. You can change or access this memory location in a...

Python Syntax

Python Indentation In Python, indentation is used to indicate a code block. Code block is a group of statements executed as a unit, like function...