Vidyalelo
Python · Q54

Python Sets MCQs: Exam

Programming · Python · question 54

Q54

Write a list comprehension for number and its cube for: l=[1, 2, 3, 4, 5, 6, 7, 8, 9]

A.
[x**3 for x in l]
Answer
B.
[x^3 for x in l]
C.
[x**3 in l]
D.
[x^3 in l]

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board