Why memory error takes place. | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Why memory error takes place.

even = [2*i for i in range(10**100)]

4th Jun 2019, 3:02 AM
B!P!N R@j
B!P!N R@j - avatar
3 Réponses
+ 2
Try it with something smaller. E.g. this works: even = [2*i for i in range(500)] print(even)
4th Jun 2019, 3:53 AM
David Ashton
David Ashton - avatar
+ 1
What's the code you're having troubles with?
4th Jun 2019, 3:12 AM
Faisal
Faisal - avatar
+ 1
Already specified above
9th Jun 2019, 3:39 AM
B!P!N R@j
B!P!N R@j - avatar