Memory allocation failed

I noticed that my code won’t run if I include in the code long lists with numeric entries. I get the following error when press run:

MemoryError: memory allocation failed, allocating 3652 bytes.

Could I save the list as a text file on the board and read the file when I run my code instead?

Sure, just use the standard

with open("/file.txt", "r") as file:
    file.read()

And etc. python coding style.