1 / 7

Dictionaries and File I/O

Dictionaries and File I/O. George Mason University. Today’s topics. Review of Chapter 7 : Maps Go over examples and questions maps in Python using files. Maps review. What is a map? How is it different than a list? How do you declare a map? How do you get the keys of a map? Values?

zahi
Download Presentation

Dictionaries and File I/O

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dictionaries and File I/O George Mason University

  2. Today’s topics • Review of Chapter 7: Maps • Go over examples and questions • maps in Python • using files

  3. Maps review • What is a map? How is it different than a list? • How do you declare a map? • How do you get the keys of a map? Values? • What is a method?

  4. Let’s go over the exercises

  5. Maps (dictionaries) in python

  6. File Input/Output • A file is stored data available through the help of the operating system • So far, we have received user input through the keyboard with input( ) • there isn’t always a user there! • Need to open the file, then get its contents • We like to store contents as a string, or list of strings • Course outcome: look up how to open a file and read its contents on your own • use Google • use the documentation • demo with figuring out how to get keyboard input

  7. Questions?

More Related