Python Programming for Raspberry Pi, Sams Teach Yourself in 24 Hours

(singke) #1
closing, 228 - 231
managing, 220 - 221
opening, 221 - 224
preexisting files, writing to, 234
reading, 224 - 228
entire file, 224 - 225
line by line, 225 - 227 , 228 - 229
nonsequentially, 227 - 228
types of, 217
writing to, 231 - 235 , 235 - 236

find() function, 208


findall() function, 320


finditer() function, 320


flapping, 544


flavors of Python modules, 258


floating-point accuracy in calculations, 102


floating-point values, formatting, 212 - 213


floor division operator (//), 98


folders, present working directory, 31


Font object, creating, 399


for loops, 132 - 143


assigning data types from a list, 135 - 136
iterating with variables, 137
iteration
with range function, 137 - 140
through character strings in a list, 136 - 137
through numbers in a list, 133 - 134
nested loops, 149 - 150
structure, 134 - 135
traversing dictionaries with, 179
validating user input with, 141 - 142

format function, 102


format() function, 209 - 210


positional formatting, 214 - 215
sign formatting, 213 - 214

formatting


long print lines with string concatenation, 79
numbers
floating-point values, 212 - 213
integer values, 212
output with print function, 73 - 75
Free download pdf