🐍

Python Programming

Comprehensive Python programming questions covering fundamentals, data structures, and advanced concepts

300 questions30 pages~450 min
Progress: 0 / 3000%
Page 1 of 30 • Questions 1-10 of 300
Q1easy

What is the output?

a = [1, 2, 3]
b = a
b.append(4)
print(a)
Q2easy

Which statement creates an immutable sequence?

Q3easy

What's the result of this expression?

3 * 'ab' + 'c'
Q4medium

Which is true about Python dictionaries?

Q5medium

What's the output?

def f(x=[]):
    x.append(1)
    return x

print(f())
print(f())
Q6easy

Which is not a valid set operation?

Q7medium

What's the output?

print(0.1 + 0.2 == 0.3)
Q8easy

What does __init__ do in a class?

Q9easy

What's the output?

print({i: i*i for i in range(3)})
Q10medium

Which of these is used to create a generator?

...