Weekly letter pythonprogramming.email

Hi,

To get the curated list of awesome python articles from all over the Internet, please subscribe with pythonprogramming.email. This is specifically suitable for beginners.

To get the curated list of awesome python articles from all over the Internet, please subscribe with pythonprogramming.email. This is specifically suitable for beginners.

Python Multiple
Choice
Questions

Write a list comprehension for producing a list of numbers between 1 and 1000 that are divisible by 3.

A. [x in range(1, 1000) if x%3==0]

B. [x for x in range(1000) if x%3==0]

C. [x%3 for x in range(1, 1000)]

D. [x%3=0 for x in range(1, 1000)]

Show
Answer

Please subscribe to get the latest articles in your mailbox.

Please subscribe to get the latest articles in your mailbox.