Which of the following is the correct way to empty a list, using theList as an example?
Correct Answer: del theList[:]
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Python Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Python MCQ Questions
Output of following code? nums = list() i = 3 while (i < 9): nums.append(i) i = i+2 print(nums)
Which will return the size of a file?
Output of following code? from functools import * def add(a, b, c): return 50*a + 5*b + c res = partial(add, c=2, b=1) print(res(2))
Which code snippet below will not return True?
Output if following code executed? a1 = 0 b2 = 1 c3 = 2 def fru_box(): a1 = b2 + c3 print((a1, '\t', b2, '\t', c3)) return fru_box()
Which is the base language of Python?
Which is a stored string.printable constant?
Which statement/s is/are correct about lossy or lossless compression?
The Python interpreter is very open to introspection. You can examine and modify many aspects of the Python runtime environment. Which of the following modules is used to retrieve information about Python runtime?
Which is the correct prototype for the 'open' function of the file class in python 2.2+?