M
Q. Write a list comprehension to produce the list: [1, 2, 4, 8, 16……212].
Explanation by: Mr. Dubey
the required list comprehension will print the numbers from 1 to 12, each raised to 2. the required answer is thus, [(2**x) for x in range(0, 13)].
You must be Logged in to update hint/solution
Be the first to start discuss.
Related MCQs
Q. A free semilattice has the property.
Q. ASP.NET separates the HTML output from program logic using a feature named as
Q. The gather Operation is exactly the inverse of _____
Q. The replacement of a bad block generally is not totally automatic because
Q. The parent directory is known as
Q. What does the “x” operator do in relational algebra?
Q. How many links are created when we creat a directory file?
Question analytics

Discusssion
Login to discuss.