On the original code in your first post for the particular error
to fix that error you would add
Error:TypeError: 'NoneType' object cannot be interpreted as an integer
was because your function prime_eratosthenes
had no return
to fix that error you would add
return prime_list
to the end of itdef prime_eratosthenes(lim): ... return prime_list(Note I replace the rest of the code with ... just to show the important part not for you to do this to your code)