Monthly Archive: August 2021

0

Python Dictionary

What is python dictionary: In Python language, dictionary data type stores data without any sequence.  In this, the data remains as a key:value  pair. When we have to access any data from this dictionary, we know the value through the  key.  From the example given below, we will understand the syntax of the dictionary in Python language. python_dictionary = {‘key1′:’value1’, ‘key2’: ‘value2′,’key3′:’value3′,’key4′:’value4’} The dictionary data type is quite different from...

0

Python list:

Python List 1 is similar to the goods in the domestic list.  Objects of different data types can be placed inside it.  Its syntax uses  square brackets.  Indexing and slicing can also be done like a  string in the list.  Below we will see some examples of Python lists. animal_list1 = [‘cat’, ‘dog’, ‘horse’, ‘cow’] bird_list = [‘peacock’, ‘crow’] Like a  string, the len() function can also be used in...

0

Python Datatypes: Strings

A string is a sequence of characters that is created using a single coat or double coat.  As in the example below. ‘Rakesh’ “My name is John” You can also use indexing in strings.  Such as in the example below. Alpahbets: J o h n G e o r g e Index:        0 1 2 3 4  5 6 7 8 9 10 Alpahbets: R a c...