JSON's in Python
Exercise 1.
Write a Python program to convert JSON data to Python object.
Exercise 2.
Write a Python program to convert Python object to JSON data.
Exercise 3.
Write a Python program to convert Python objects into JSON strings. Print all the values.
Exercise 4.
Write a Python program to convert Python dictionary object (sort by key) to JSON data. Print the object members with indent level 4.
Exercise 5.
Write a Python program to convert JSON encoded data into Python objects.
Exercise 6.
Write a Python program to create a new JSON file from an existing JSON file.
Exercise 7.
Write a Python program to check whether an instance is complex or not.
Exercise 8.
Write a Python program to check whether a JSON string contains complex object or not.
Exercise 9.
Write a Python program to access only unique key value of a Python object.
Backlinks (1)
1. Python /wiki/ccs/programming/languages/python/
Data Types
| category | types |
|---|---|
| text | str |
| numeric | int, float, complex |
| sequence | list, tuple, range |
| mapping | dict |
| set | set, frozenset |
| boolean | bool |
| binary | bytes, bytearray, memoryview |
| none | NoneType |
Keywords
Python reserves 35 hard keywords (plus the soft keywords match and case for structural pattern matching since 3.10). Reserved keywords cannot be used as identifiers; soft keywords are only special in the relevant context.