This technical blog is my own collection of notes , articles , implementations and interpretation of referred topics in coding, programming, data analytics , data science , data warehousing , Cloud Applications and Artificial Intelligence . Feel free to explore my blog and articles for reference and downloads . Do subscribe , like , share and comment ---- Vivek Dash
Thursday, July 22, 2021
Shopping Cart Total Bill Generation Project in Python using Jupyter Notebook | Sample Mini-Project Implementation Infographic Note
Saturday, July 17, 2021
Monday, July 12, 2021
Monday, June 7, 2021
Lists and Dictionaries in Python Dictionaries in Python
When should one use dictionaries and when should one use lists in Python
* Example where a List is used for data storage is an example of a shopping cart where any stored item object's storage does not matter .
* Example where a Dictionary Item object is used as a storage object is that of a an examination roll / rank number sheet ( parikhya patra ) where people are arranged on the basis of their marks obtained in some examination from Rank 1 to the last rank in the exam . Usually the person who obtains the highest marks in a given exam is attributted the 1st rank and the first roll number for that examination is also alloted to the first rank holder after the results are out , the successive role numbers are also attributed according the net marks obtained by an examiner in the considered case of the examination till the last rank/roll number of the examiner .
* A dictionary is very useful data storage object where one may need to access a given data based on the item that is present over a given index position within the storage object of the data structure .
To sum up once again for Lists and Dictionaries
* Lists are ordered data structure objects that means that the program has control over the
order in which the data is stored . This data is also sortable that means that the program can sort the data into whatever order when the data is needed to be fetched and retrieved , the list is also containing a list of iterable items i,e items that can be accessed one item at a time when the list object is iterated or
executed within a loop .
* Dictionaries are like the partially ordered data structures that
can control the order or the manner in which the data items are inserted and stored within the
object in the form of keys and attributes . Dictionaries are non-sortable
and iterable in pairs of both keys
and associated value objects .
Last
modified: 18:49