June 2021

Python Code

Comments in Python

Leaving code comments might sometimes help clarify your code. There are 3 unofficial comment types in Python. A “block comment”: An “inline comment”: A “multi-line” comment that misuses a docstring: Commenting Code in Python To add a comment in Python, use the hashtag operator # before starting to type the comment. Before digging into the […]

Comments in Python Read More »

Python Pretty Print JSON

To pretty-print JSON in Python: For example: Where: Here is an illustration of what pretty printing does to JSON objects: In this guide, you learn why JSON is usually unreadable and how to use pretty printing to fix the problem. You will also see some common examples when pretty-printing. Before learning how to pretty-print JSON,

Python Pretty Print JSON Read More »