Python Dictionaries
Posted on Oct. 30, 2019, 12:49 p.m.
Dictionary is a python data type that is used to store key-value pairs. It enables you to quickly retrieve, add, remove, modify, values using a key. Dictionary is very similar to what we call associative array or hash on other …
Read MorePython Lists
Posted on Oct. 30, 2019, 12:28 p.m.
List type is another sequence type defined by the list class of python. List allows you add, delete or process elements in very simple ways. List is very similar to arrays.
Creating list in python #
You can create list using …
Read MorePython Strings
Posted on Oct. 30, 2019, 11:59 a.m.
Strings in python are contiguous series of characters delimited by single or double quotes. Python doesn't have any separate data type for characters so they are represented as a single character string.
Creating strings #
1 2 | >>> name = "tom" # a … |
Python Numbers
Posted on Oct. 30, 2019, 10:18 a.m.
This data type supports only numerical values like 1
, 31.4
, -1000
, 0.000023
, 88888888
.
Python supports 3 different numerical types.
int
- for integer values like1
,100
,2255
,-999999
,0
,12345678
.float
- for floating-point values like2.3
,3 …
Datatype & Variables
Posted on Oct. 30, 2019, 9:35 a.m.
Variables are named locations that are used to store references to the object stored in memory. The names we choose for variables and functions are commonly known as Identifiers. In Python, Identifiers must obey the following rules.
- All identifiers must …
Running python programs
Posted on Oct. 30, 2019, 9:27 a.m.
You can run python programs in two ways, first by typing commands directly in python shell or run program stored in a file. But most of the time you want to run programs stored in a file.
Lets create a …
Read MoreInstalling Python3
Posted on Oct. 30, 2019, 9:23 a.m.
This tutorial focuses on Python 3. Most Linux distribution for e.g Ubuntu 14.04 comes with python 2 and 3 installed, here is the download link. If you are using some other linux distribution see this link for installation …
Read MoreGetting started with python
Posted on Oct. 30, 2019, 9:22 a.m.
What is Python? #
Python is a general-purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career Python suits you best. With Python you …
Read More