Posts

Showing posts from October, 2021

Operators in Python

Image
                           Arithmetic Operators in Python  Concatenation of Strings can be achieved by using + operator & repetition of strings can be achieved by using * operator .. Rest of arithmetic operators are self explanatory ... Relational Operators in Python  Above Relational operators are self explanatory , output of relational operations are either True or False ..                                         Assignment Operators                                          Logical Operators  AND (should be written in small case ): If both the operands are True, then condition becomes True ...  OR (should be written in small case ): If any of...

Mutable & Immutable Data Types

Image
                    Mutable & Immutable Data Types  Mutable Data Types : Data Types (Variables) whose values can be changed or updated after they are created and assigned are called mutable.. Immutable Data Types : Data Types (Variables) whose values  can not  be changed or updated after they are created and assigned are called mutable.. Lists [ ] In above Example you can see x is  list data type which consists of values 1,2,3,4 .. In position 0 of x  (position 0 is index value),  1 was present but then we assigned 100 in position 0 of x .. Hence value of position 0 is updated from 1 to 100 ... Hence , List data type is mutable in nature.. I will cover more details on index position of list data type in further blog... Dictionary {Key:Value} : In above Example you can see ips is dictionary data type which consists of key :values pair .. Inside Dictionary vBond , vSmart & vManages are ...