Python
Python Data Types with examples
Data types are nothing but variables you use to reserve some space in memory. Python variables do not need an explicit declaration to reserve m
Continue readingPython Installing external modules using pip
pip is your friend when you need to install any package from the plethora of choices available at the python package index (PyPI). pip is already installed if you're us
Continue readingPython - str() and repr() function
There are two functions that can be used to obtain a readable representation of an object.
Continue readingPython User Input
To get input from the user, use the input function (note: in Python 2.x, the function is called raw_input instead, although Pytho
Continue readingPython defaultdict
A defaultdict is a dictionary with a default value for keys, so that keys for which no value has been explicitly defined can
Continue readingPython Set
A set is a collection of elements with no repeats and without insertion order but sorted order. They are used in situations where
Continue readingPython Dictionaries
A dictionary in Python is a collection of key-value pairs. The dictionary is surrounded by curly braces. Each pair is separate
Continue readingPython Tuples
A tuple is similar to a list except that it is fixed-length and immutable. So the values in the tuple cannot be changed nor the val
Continue readingPython list
The list type is probably the most commonly used collection type in Python. Despite its name, a list is more like an array in other l
Continue readingPython creating variables and assigning values
To create a variable in Python, all you need to do is specify the variable name, and then assign a value to it.
Continue reading