0
How to create a list? Python
That conrains only prime numbers in range (0, n)
3 Respostas
+ 8
There are two ways to create list in python
1st way with square brackets like this.......e.g.👇👇
var=[1, 2, 5, 8, "Sam", 6.2]
2nd way... Using list function.......... e.g. 👇👇
var=list(1, 2, 3, 5, 8, "Sam", 6.2)
+ 3
hi, in python there is no “ready to use” function or class for handling prime numbers. But you can have a look at this code challenge:
https://www.sololearn.com/learn/969/
0
No. So i have a number N. I want to create a list, that contains all prime numbers <=N. So like [2,3,5,7,11,13,17] etc.