0

What is the difference of the output between use getsizeof and st_size ? When I use getsizeof the output is 144 but when I use st_size is 148. Anybody knows why this happening.

Any help will greatly appreciated.

Nirav Joshi
  • 2,884
  • 1
  • 21
  • 43
Olymbia
  • 1
  • 2

1 Answers1

0

From How to check file size in python?:

Note: the implementation of os.path.getsize is simply return os.stat(filename).st_size – wim Mar 21 '13 at 11:20

So it really should return the same...

Lucy The Brazen
  • 105
  • 1
  • 8