Notes in Python

To Subscribe, use this Key


Status Last Update Fields
Published 05/03/2024 any number of keyword arguments packed into a dictionary
Published 05/03/2024 any number of positional arguments packed into a tuple
Published 05/03/2024 continue statement
Published 05/03/2024 create a function that doubles a number with default input
Published 05/03/2024 Divide r by 3 "in place".r = 12
Published 05/03/2024 enter interactive debugger in python IDE
Published 05/03/2024 find current path
Published 05/03/2024 from random import randrange
Published 05/03/2024 hash
Published 05/03/2024 Implement the Bunch design patternemployee = Bunch(name="Jayne Cobb", position="Senior Engineer")employee.name #=> 'Jayne Cobb'
Published 05/03/2024 print vowels in "powerful" on one linevowels = 'aeiouy'
Published 05/03/2024 Sets and Dicts in Python are _____
Published 05/03/2024 Find all elements common to both sets, aka intersection.engineers = {'bob', 'sue', 'ann', 'vic'}managers = {'tom', 'sue'}
Published 05/03/2024 Find all people in either setsusing set method callengineers = {'bob', 'sue', 'ann', 'vic'}managers = {'tom', 'sue'}
Published 05/03/2024 Find engineers who are not managers using a set method callengineers = {'bob', 'sue', 'ann', 'vic'}managers = {'tom', 'sue'}
Published 05/03/2024 Are all managers engineers?Bonus: make trueengineers = {'bob', 'sue', 'ann', 'vic'}managers = {'tom', 'sue'}
Published 05/03/2024 Are bob and sue both engineers? (subset)engineers = {'bob', 'sue', 'ann', 'vic'}managers = {'tom', 'sue'}test = {'bob', 'sue'}
Published 05/03/2024 Who is in one but not both (use operator)?engineers = {'bob', 'sue', 'ann', 'vic'}managers = {'tom', 'sue'}
Published 05/03/2024 weakref
Published 05/03/2024 clear screen in Console
Published 05/03/2024 list.extend
Published 05/03/2024 escape next 2 characters, akak hex digits
Published 05/03/2024 Byte strings
Published 05/03/2024 Unicode
Published 05/03/2024 Using string formatting expression, describe this parrotkind = 'red'
Published 05/03/2024 Using string formatting method, describe a parrotkind = 'red'
Published 05/03/2024 Since strings are immutable, I should
Published 05/03/2024 % operator provides _____
Published 05/03/2024 The string object’s format method _____
Published 05/03/2024 a generator is a 
Published 05/03/2024 foo?
Published 05/03/2024 The best way to format strings
Published 05/03/2024 A method only takes self as a parameter, which means ________
Published 05/03/2024 run file from IDEtemp.py
Published 05/03/2024 add 'tom' to engineersengineers = {'bob', 'sue', 'ann', 'vic'}
Published 05/03/2024 create an iterator over a dictionaryd = {'apple':1, 'orange':2}
Published 05/03/2024 with open("gettysburg.txt") as f:    for line in f:        print(repr(line))
Published 05/03/2024 once for each regex match
Published 05/03/2024 get current directory
Published 05/03/2024 delete first two entriesname 2 waysa = list(range(-4, 4))
Published 05/03/2024 What is PEP 8?
Published 05/03/2024 Test if engineers is a subset of managers
Published 05/03/2024 square each number from 1 to 10use list comprehension
Published 05/03/2024 Find engineers who are not managersusing an operatorengineers = {'bob', 'sue', 'ann', 'vic'}managers = {'tom', 'sue'}
Published 05/03/2024 Find all people in either setsusing an operatorengineers = {'bob', 'sue', 'ann', 'vic'}managers = {'tom', 'sue'}
Published 05/03/2024 split the string using comma as a delimetersort them in alphabetical order (case insensitive)combine them back into a string of comma seperated values…
Published 05/03/2024 How to iterate through the key value pairs of a dictionary?colors = {'blue':(0,0,255), 'red':(255,0,0)}
Published 05/03/2024 What is default implementation of Python?
Published 05/03/2024 In Python everything is _________, including compiletime
Published 05/03/2024 Execution happens in ________.
Published 05/03/2024 What is the data structure for namespace?
Status Last Update Fields