0

I have list.txt. This file consist from strings:

name1
name2
name3
name4
name5
...

On disk file space near 196 MB.

But after loading it into memory:

L = []
F = open('list.txt')
L = F.readlines()
F.close()

he placed there 1,3 GB.

Please tell why there is so huge difference between on-disk file and his copy in list structure in RAM?

Running with Python 2.7 on Windows 7 x64.

Denis Leonov
  • 171
  • 1
  • 11

0 Answers0