Changes

Jump to: navigation, search

OPS435 Python Lab 4

21 bytes added, 16:46, 15 June 2017
PART 3 - Dictionaries
== PART 3 - Dictionaries ==
::By now, you have probably been exposed to database terminology. For example, a '''database ''' is a collection of ''related records''. In turn, '''records ''' are a collection of ''related fields''. In order to access a record in a database, you would need to access it by '''key field(s)'''. In order words, those key field(s) are a '''key that unlocks the access to a record''' within a database.
::In Python, a '''dictionary''' is a set of key-value pairs. Dictionaries are '''unordered''', like sets, however any value can be retrieved from a dictionary if you know the key. This section will go over how to create, access, and change dictionaries, providing a new powerful tool to store and manipulate data.
:::4. Before proceeding, make certain that you identify any and all errors in lab4c.py. When the checking script tells you everything is OK before proceeding to the next step.
<br><br>
 
== PART 4 - List Comprehension ==
:We've already covered lists to a degree. Lets move into more advanced functions to use and generate lists. This is a very common practice in Python, understanding how to generate, manipulate, and apply functions to items inside a list can be incredibly useful. List comprehension is a way to build new lists from existing list and to do it faster than simply looping over lists.
13,420
edits

Navigation menu