Mastering Binary File Handling in Python: Read & Write Like a Pro 😎

Описание к видео Mastering Binary File Handling in Python: Read & Write Like a Pro 😎

Get 20% OFF with Hostinger Web Hosting: https://hostinger.com?REFERRALCODE=1SILASELSON95

Hey guys,
Welcome back to another Python tutorial! In this video, I’m going to go over how to work with binary data using Python. So if you’re ready, let’s get started!

What is binary data? Binary format/data is data that isn’t text. In other words, any file that isn’t .txt is a binary file. Video files, audio files and images are common examples of data in binary format. Binary format is useful is because it allows the computer to store more data effectively, causing it to be the go-to format for larger files

To read a binary file in Python, you must use the parameter ‘rb’, instead of ‘r’. ‘R’ is only for reading from a .txt file, while ‘rb’ is for reading from a binary file. If you try to read from a binary filing using ‘r’, you will just get an error. The same goes for writing as well. Instead of using ‘w’, Python requires you to pass ‘wb’ for it to work correctly.

Chapters:
00:00 - Intro
00:21 - What is binary data?
00:32 - Common example of files in binary format
01:05 - Reading from a binary file
02:00 - Sponsor
02:25 - Writing to a binary file
03:24 - Another example of reading & writing to file in binary format
04:54 - Outro

Tags:
==========================
programming, python, coding, learn how to program, learning python, how to program in python, program using python, python programming, programming tutorials, learn programming, coding tutorials, programming for beginners, how to code, programming languages, coding for beginners, free coding courses, free coding tutorials, free programming courses, free programming tutorials, writing binary data, reading binary data, open file in binary mode, binary file read, binary file write, open(filename, 'wb'), open(filename, 'rb'), bytes object, bytearray, encode data, decode data, file handling, binary file operations, file read, file write, binary file manipulation, binary data processing, binary file access, read(), write(), binary file format

Комментарии

Информация по комментариям в разработке