0

I was generating primes under 20,000,000 and pydroid crashed,thankfully I had anticipated it and incorporated a backup that backs up every 1000 primes. But I can't seem to convert that to a list from a .txt file.I could get the list (open('filepath.txt').readlines())[0] But it is still a string,Any ideas on how to convert it to a list? Maybe a for loop?

I can't copy paste it because the list is too long now and pydroid crashes when I try.

  • 1
    It so happens that a list of integers will look the same in JSON as it does in native Python syntax. However, it would be better to use a serialization format like JSON explicitly. – Karl Knechtel Oct 23 '22 at 02:54

0 Answers0