[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
What will be the output of the following Python list comprehension?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What will be the output of the following Python list comprehension?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!