Q1: What is the correct file extension for Python files?
Q2: How do you create a variable with the numeric value 5 in Python?
Q3: Which method can be used to remove any whitespace from the beginning or the end of a string?
Q4: What keyword is used to define a function in Python?
Q5: Which operator is used for exponentiation in Python?
Q6: Which of the following is a tuple?
Q7: Which keyword is used for loops in Python?
Q8: What is the output of len('Python')?
Q9: How do you insert COMMENTS in Python code?
Q10: Which function is used to get input from a user?
Q11: Which data type is immutable in Python?
Q12: What will `type(10.5)` return?
Q13: What does `range(3)` produce?
Q14: What is the correct way to open a file for reading?
Q15: What is the correct syntax to define a class in Python?
Q16: Which keyword is used to handle exceptions?
Q17: How do you define a dictionary in Python?
Q18: Which method adds an item to a list?
Q19: What is the index of 'b' in the list ['a','b','c']?
Q20: What does the `break` statement do?
Q21: How do you create a comment that spans multiple lines?
Q22: Which function returns the highest value from a list?
Q23: What is the result of 3 // 2?
Q24: How can you generate a random number?
Q25: Which Python keyword is used to create a generator?
Q26: Which built-in module helps in working with regular expressions?
Q27: Which symbol is used to import a module in Python?
Q28: What is `None` in Python?
Q29: Which function is used to convert string to integer?
Q30: How can you handle multiple exceptions?
Q31: Which function is used to get the length of a list?
Q32: Which statement will create a list?
Q33: Which of the following is not a valid Python data type?
Q34: What is the correct way to define a lambda function?
Q35: What is the output of bool('False')?
Q36: Which keyword is used to define a subclass?
Q37: What is `__init__`?
Q38: Which loop is used to iterate over items of a list?
Q39: How do you remove duplicates from a list?
Q40: What is the correct way to check if x is equal to y?
Q41: What does the `pass` statement do?
Q42: Which function is used to iterate with an index?
Q43: What will `print('Hello'[-1])` output?
Q44: Which one is a mutable data type?
Q45: Which module helps you work with JSON in Python?
Q46: Which Python keyword is used to create an anonymous block?
Q47: What is the use of `is` in Python?
Q48: Which function will round a number?
Q49: What is the result of 2 ** 3?
Q50: Which of the following is used to define a function in Python?