ecs10-11-28

Break immediately jumps out of the loop usually used

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: eak Immediately jumps out of the loop. Usually used with for loops. Avoid with while. while. Efficient Solution Better to "look up" names, like in a phone book. Use a dictionary. dictionary. A dictionary can be accessed by indexing, like a list, b li but any ki d of data can be used as the kind f d b d h index. Words are keys. keys. Definitions are values. values. Dictionary 1 Dictionary Entry myDict = {"ferret":"Ferdinand"} key value Looking up an Item Look up a val...
View Full Document

Ask a homework question - tutors are online