CSE 1010 Lecture Notes - Lecture 9: Text Mode, Standard Streams, Nondestructive Testing
jadetortoise401 and 55 others unlocked
84
CSE 1010 Full Course Notes
Verified Note
84 documents
Document Summary
Start out with variable, touch on strings (slice, repetition, concatenation), then strings in more depth, lists, functions, looping, nested looping, dictionaries. File "", line 1 import import lib as imp. Type "help", "copyright", "credits" or "license" for more information. In general functions that return values are more flexible: dictionionaries, write a python program that stores the number of each items, using variables, ex, scissor = 2, can use a list. List is indexed by a range of numbers: using dictionary, dictionary is a container of key-value pairs. 2: the method get() returns a value for the given key. If key is not available then returns default value: dict. get(key, default=none, create empty dictionary, add a pair to the dictionary, state_capitals["ct"] = "hartford, delete item from dictionary use del. Lab def zip(a, b): x = [] i = 0 while i < len(a): x. append(a[i]) x. append(b[i]) i = i + 1 return x.