Binary File Handling Program In Python Using Loop