CISC 121 Lecture Notes - Lecture 4: Standard Streams

103 views3 pages
Verified Note

Document Summary

That said, it"s probably more common for a program to need to determine whether or not a specific value is associated with a known key, as in. Removing a key:value pair from dict is done with del, which was seen earlier. search_surname = smith" my_info = { surname":"linley", found = my_info[ surname"] == search_surname. After this, found has value false del my_info[ birth_year"] You may need to group similar dictionaries in a list (i. e. for database applications), where a database table might be read into a list of dictionaries. A tuple is a collection of comma-separated data elements usually (but not necessarily) surrounded by round brackets. Dictionaries can contain dictionaries and lists; lists can contain lists and dictionaries. Nesting these structures too deeply within one another can cause difficulty retreiving data from the layers for programmers, but it can be done.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents