SyntaxFix
Write A Post
Hire A Developer
Questions
Try
os.path.getsize(filename)
It should return the size of a file, reported by os.stat().