PYTHON CIRCLE
Practice
Python Books
Archive
Tools
Contact
Subscribe
Menu
Practice
Python Books
Archive
Tools
Contact
Subscribe
1000 Python Questions
Get 1 Python question daily. Join this telegram channel
https://t.me/python1000questions
Advertise with us
Python Multiple Choice Questions
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]
B. [x^3 for x in l]
C. [x**3 in l]
D. [x^3 in l]
Show Answer
Next Question
Correct Answer:
A
Explanation: The list comprehension to print a list of cube of the numbers for the given list is: [x**3 for x in l].
SUBSCRIBE
Please subscribe to get the latest articles in your mailbox.
SUBSCRIBE
Please subscribe to get the latest articles in your mailbox.
© 2017-2020 Python Circle
Contact
Sponsor
Archive
Sitemap