You can download this code by clicking the button below.
This code is now available for download.
Read the content of a file as binary data and return it.
Technology Stack : Built-in file operations
Code Type : File operation
Code Difficulty :
def zip_file(filename):
with open(filename, 'rb') as f:
content = f.read()
return content