Writing Json, Yaml and Binary files using python
JSON
YAML
- Install pyyaml from pip
- Refer Here for the sample used in the class.
struct
- 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)
file.write(data)
Next Topics
- List Comprehensions
- Python Object Oriented ABC
- Decorators, Attributes and Lambda functions
- Using mysql/other databases in python.
Like this:
Like Loading...