πŸ“Š Python
Q. What will be the output of the following Python list comprehension?
Code:
[j for i in range(2,8) for j in range(i*2, 50, i)] 
  • (A) A list of prime numbers up to 50
  • (B) A list of numbers divisible by 2, up to 50
  • (C) A list of non prime numbers, up to 50
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (C) A list of non prime numbers, up to 50

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
198
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Tanmay
Publisher
πŸ“ˆ
93%
Success Rate