Python Sets Python Set¶A set is an unordered collection of items. Every set element is unique (no duplicates) and must be immutable (cannot be changed). Sets are used to store multiple items in a single variable. Set is one of 4 built-in data types in Python used to store collections …
Read More »Python Dictionary
Python Dictionary Python Dictionary¶Dictionaries are used to store data values in key:value pairs. A dictionary is a collection which is ordered*, changeable and does not allow duplicates. Dictionaries are written with curly brackets, and have keys and values: {‘Key’:’Value’} Note:As of Python version 3.7, dictionaries are ordered. In Python 3.6 …
Read More »Python Tuples
Python Tuple Python Tuples¶Tuples are used to store multiple items in a single variable. Tuple is one of 4 built-in data types in Python used to store collections of data, the other 3 are List, Set, and Dictionary, all with different qualities and usage. A tuple is a collection which …
Read More »Python Lists
Python List Python Lists¶Lists are used to store multiple items in a single variable. Lists are one of 4 built-in data types in Python used to store collections of data, the other 3 are Tuple, Set, and Dictionary, all with different qualities and usage. Lists are created using square brackets: …
Read More »Python Strings
String in Python Strings in Python : MachineLearning.org.in¶Strings are used in Python to record text information, such as name. Strings in Python are actually a sequence, which basically means Python keeps track of every element in the string as a sequence. For example, Python understands the string “hello’ to be …
Read More »Python Numbers
Python Numbers Python Numbes¶Number data types store numeric values. They are immutable data types, means that changing the value of a number data type results in a newly allocated object. Python supports four different numerical types −¶ int long float complex In [1]: x = 10 # int y = 3.28 …
Read More »Python Loops: for and while Loops with Examples
Learn Python for and while loops with examples: range(), looping through strings, break, continue, else and nested loops, with the output for every snippet.
Read More »Python Decision Making
Task 1 – Conditional Statements Python Decision Making¶Python supports the usual logical conditions from mathematics:¶ Equals: a == b Not Equals: a != b Less than: a < b Less than or equal to: a <= b Greater than: a > b Greater than or equal to: a >= b …
Read More »Python Basic Operators
2 Operators in Python¶An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. Python language is rich in built-in operators and provides following types of operators. Types of Operators¶We have the following types of operators in Python programming − Arithmetic operators Assignment operators Relational/Comparison …
Read More »Python Variable Types
Python Variable Types Python Variables¶Variables are containers for storing data values. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. The interpreter allocates memory and determines what can be stored in the allocated memory depending …
Read More »
Machine Learning Tutorials, Courses and Certifications