Posts

python os module

  v   Python OS module: -   The os module in Python provides a way to interact with the operating system. It allows you to perform operating system-dependent tasks such as:                Navigating the file system                Managing files and directories                Handling environment variables                Running system commands   It's part of Python’s standard library, so no installation is needed.

1.13 JSON in Python

Image
  v   JSON in Python: - JSON stands for JavaScript Object Notation, which is a format for structuring data. It is a widely used data format for storing and transferring data between a client and a server system. It can be used with various programming languages such as Python, Perl, Java, etc. Python supports JSON through a built-in package called Json . To use this feature, we import the JSON package in Python.   The text in JSON is done through quoted strings, which contain the value in key-value mapping within { },  which is similar to a dictionary in Python. JSON supports primitive types like numbers, strings, lists, nested lists, tuples and objects. In Python, we can convert Python objects (like dictionaries and lists) into JSON strings; this process is called serialisation and also parse JSON data back into Python objects; this process is called deserialisation. Python provides the following important methods in the JSON module: 1.  ...