Python Classroom Series – 02/Oct/2020

Writing Json, Yaml and Binary files using python



  • Install pyyaml from pip
  • Refer Here for the sample used in the class.


  • Some advanced apps need to deal with packed binary data. Python’s standard library includes module struct
import struct
with open('data.bin', 'wb') as file:
    data = struct.pack('>i4sh', 8, b'text', 10)

Next Topics

  • List Comprehensions
  • Python Object Oriented ABC
  • Decorators, Attributes and Lambda functions
  • Using mysql/other databases in python.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin