CBSE 2026 results are out, Mukul scored a perfect 100/100 in Computer ScienceSee all toppers →

KwickClips Python

Python: 204 short revision clips (page 2)

One idea per clip, with the answer written out underneath. Each clip links back to the full Python lesson it came from.

A grid filling row by row as the inner column loop restarts for each row.Does the inner loop restart each row?43 secA star triangle growing row by row, with a number triangle and a letter triangle beside it.What decides how many stars a row has?41 secA trace table of row and col values with the printed products 1, 2, 2 and 4.How many trace lines do you write?43 secA nested loop testing divisors of each number to print the primes in a range.Is 1 a prime number?39 secIndex ruler for the word MUMBAI showing positive indexes 0 to 5 and negative indexes -6 to -1.MUMBAI has six letters. Is the last one at index 6?46 secCode slicing the string SUNDAY with [0:3], [::2] and [::-1], showing SUN, SNA and YADNUS.Can you reverse a string without a loop?41 secPython code joining Riya and Shah, repeating Go! three times, and checking go in mango.What does * do to a string?42 secFor loop printing each letter of DELHI on one line, separated by spaces.How do you check each letter of a word?37 secCode showing name[0] = S is a TypeError and "S" + name[1:] printing Savya.Can you change one letter of a string?41 secCode running len, upper, lower, capitalize and title on the string riya SHAH with outputs.What is the difference between capitalize() and title()?40 secTable searching banana: count a gives 3, find z gives -1, index z gives ValueError, endswith a gives True.What does find() return if the text is not found?42 secCode printing isalpha on Riya and Riya Shah, isdigit on 2026 and isalnum on Class9.Why is "Riya Shah".isalpha() False?44 secTable of strip, replace, split and join, with what each does to text.What is the opposite of split()?44 secTable of three programs: count vowels, palindrome and word count, with the key line for each.How do you check a palindrome in Python?41 secCode changing fruits[1] to guava, printing mango and guava.Is a Python list mutable?43 secCode with nums = [10, 20, 30, 40] printing nums[-1] as 40 and nums[1:3] as [20, 30].Why does nums[1:3] give only two items?42 secCode joining Mon, Tue with Wed, repeating [0] three times, and checking Sun in days.What does [0] * 3 give?42 secCode looping over a nested list of names and marks, printing Riya 85 and Aman 72.Can a list hold other lists?42 secCode where alias = team and safe = team.copy(); changing alias prints [9, 2] [1, 2].Why did the original list change?43 secCode building a list with list(range(2)), append, extend and insert, printing 6 [9, 0, 1, [5, 6], 7, 8].Why did append give a nested list?45 secCode using remove, reverse, count, pop and index on the list [4, 6, 4, 1] with outputs.What is the difference between remove() and pop()?46 secCode printing sorted(marks), marks.sort() as None, then the sorted marks list.Why does print(marks.sort()) show None?40 secCode with bill = [40, 20, 60] printing min 20, max 60 and average 40.0.How do you find an average without a loop?41 secCode marks = marks.append(78) printing None.Why did marks become None?41 secCode starting a variable at the first mark and replacing it with any bigger mark.Why not start at 0?40 secA pointer moving along a list from index 0 until it matches 91 at index 2.Where does linear search start?41 secA frequency dictionary counting the runs off six balls, using get with a default of 0.What does get(r, 0) do?40 secA loop multiplying each list value by its index, totalling 40.What does p hold in the loop?43 secTable comparing list and tuple: brackets, whether items can change, and what each is best for.Why did changing an item give a TypeError?43 secCode on t = (1, 2) showing indexing, slicing, joining, repeating and membership with outputs.Can you join two tuples?45 secCode making a tuple with tuple(), then len, min, max, sum, count, index and sorted outputs.Is it a mistake that sorted() gives a list?45 secCode unpacking a nested tuple row and swapping tea and milk, printing Om 88 25 10.How do you swap two variables in Python?40 secLinear search code over marks (45, 80, 62, 93) printing 2 45 93 and mean 70.0.What does -1 mean in this program?43 secCode with menu = {tea: 10, poha: 25} printing menu[poha] as 25.How do you find a price by name in Python?41 secCode changing tea to 12, adding idli 30 and deleting poha, printing the new menu.How does Python know whether to add or change?44 secCode looping over menu.items() and printing tea 10 and poha 25.Why does my dictionary loop print only names?39 secTable grouping dictionary tools into read, add or change, and delete.Which dictionary method avoids a KeyError?42 secCode counting letters of banana with get, printing b 1, a 3, n 2.How does get() help count letters?40 secCode with rolls = {3, 1, 3, 2, 1} printing {1, 2, 3} and length 3.Why is the length of {3, 1, 3, 2, 1} three?42 secCode with gym {1, 2, 4} and art {2, 4, 5} showing union, intersection, difference and symmetric difference.Which operator finds items in both sets?46 secCode using add, update and discard on seats, printing {1, 2, 3, 4, 5}.Which set method can crash on a missing item?43 secTable comparing list and set: removing repeats, fast in checks, order and indexes.Why use a set instead of a list?43 secSlide listing function, reuse and modularity definitions.What is reuse?43 secTable of built-in print, module math.sqrt and user-defined bill functions.Why does square root need import?41 secCode defining calc that returns a + b and a * b, printing 9 20.Can a Python function return two values?44 secCode with def tea printing B, then print A and a call to tea, output A then B.Does the def line run the function?43 secCode defining si for simple interest and printing 1000.0 for 10000, 5, 2.What does si(10000, 5, 2) return?39 secCode def recharge(amount) called with 199, printing Paid 199.Are parameters and arguments the same?39 sec

Want a plan that actually fits your board dates?

Ask Kajal Ma'am directly, 20+ years teaching computer science. Free demo class first, no payment.

Talk to Kajal Ma'am on WhatsApp

Or see the Class 12 Computer Science course →

Studying outside India?

We coach CBSE, IGCSE & international students across the globe, one-to-one, in your local time zone.

Visit International →