import os
      
      os.path.getsize(path)
      Python language logo

      Get size of a file

      Python public recipes

      This code prints the size of the file "/path/to/file" on the console.

      Shortcut: file.getsize

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.