Python Programming - MCQ Practice Questions
Core Python MCQs — syntax, data types, OOP, libraries for placements & IT exams.
119 questions | 100% Free
What is the correct way to create a variable in Python?
Which of the following is NOT a valid Python identifier?
What will be the output of: print(type(5.0))?
Which keyword is used to create a function in Python?
Which data type is immutable in Python?
What will be the output of: len('Python')?
Which operator is used for integer division in Python 3?
Which of the following will create an empty dictionary?
Which method is used to add an element to a Python list?
What will be the output of: 'Hello' * 2?
Which of the following is a mutable data type in Python?
What will be the output of the following code? x = [1, 2, 3] x.append([4, 5]) print(len(x))
What is the output of: print(2 3 2)?
What will be the output of: x = [1, 2, 3] y = x x.append(4) print(y)
Which statement about Python comments is correct?
What will be the output of: 'a' in 'apple'?
Which of the following will raise an IndexError?
What will be the output of: print(type())?
Which of the following keywords is used to create a function in Python?
What will be the output of: print("Python"[2:5])?