Python Programming for the Absolute Beginner, 3rd Edition

L

labels, 307–308

languages, high-level, 3

len() function, 98

lists with, 131

tuples, 118

less than operator, 59

less than or equal to operator, 59

levels, adding, 415–416

lifetime attribute, Message class, 429

line-continuation character, 20

lines

blank, 14

new, suppressing, 27–28

reading characters from, 203–204

reading into lists, 204–205

lists

append() function, 136

concatenating, 132

creating, 130

defined, 129

deleting slices from, 134

elements, deleting, 133–134

High Scores program example, 134–135

indexing, 131

len() function with, 131

methods for, 138

mutable, 132

new list slice, 133

in operator with, 131

reading lines into, 204–205

remove() function, 137

reverse() function, 138

shared references, 144–147

slicing, 131

sort() function, 137

livewires modules, 338–339

load_images() function, 344–345, 431

loading

music, 391

sound, 388–389

load_music() function, 431

load_sound() function, 388–389, 431

logical errors, 42–43

logical operators

and, 81–82

not, 81

or, 83

Longevity program example, 316–317

looping

music, 392

sound, 390

loops

infinite, 69–71

for loops, 92–94

Loopy String program example, 93

while, 67–69, 92

Loopy String program example, 93

Losing Battle program, 70–71

lower() method, 40–41

Категории