KwickClips Python
Python: 204 short revision clips (page 3)
One idea per clip, with the answer written out underneath. Each clip links back to the full Python lesson it came from.
What happens if qty is missing?41 sec
Why is fee(amt=9, 1) an error?40 sec
Why does the old item stay in a list default?42 sec
Why does temp give a NameError outside the function?40 sec
Why did the wallet not change without global?40 sec
What does LEGB stand for?44 sec
What does print(change(), marks) print?39 sec
Why did sqrt give a NameError?40 sec
What is math.ceil(-4.2)?43 sec
Can randrange(1, 6) give 6?40 sec
What does median() do?42 sec
Can your own file be a module?44 sec
What is an exception?42 sec
Does else run when there is an exception?44 sec
Why avoid a bare except?39 sec
What does raise do?41 sec
Why do variables lose data?40 sec
Why did my old lines vanish?45 sec
What does readlines() return?39 sec
What happens when the with block ends?39 sec
What does tell() return?42 sec
Why does a .dat file look like junk in Notepad?44 sec
What is the argument order for dump?38 sec
Which mode adds a record without erasing?44 sec
Why use while True to read records?41 sec
What does CSV stand for?38 sec
What does writerows() take?41 sec
Is 88 read from a CSV a number?38 sec
Why is there a blank row after every CSV row?42 sec
What does LIFO mean?40 sec
Which list method pushes onto a stack?45 sec
What is underflow?39 sec
Why does undo remove the latest change?41 sec
Where do you run the pip command?43 sec
What does fetchone() return when no rows are left?41 sec
Which operations need a commit?43 sec
Why does one value need a comma in (m,)?40 sec
Why is NumPy fast?39 sec
How do you create a NumPy array from a list?40 sec
Why does 1 print as 1. in np.array([1, 2.5, 3])?42 sec
What does [1, 2, 3] * 2 give?36 sec
What does one-dimensional mean here?41 sec
What becomes the index when you use a dictionary?45 sec
Does marks["Riya":"Aman"] include Aman?42 sec
Why does an unmatched label give NaN?43 sec
What is a DataFrame?39 sec
Why does 88 become 88.0 in a DataFrame?41 sec
Why does drop() seem to do nothing?41 sec
