This projects contains: What is Unit testing and how to implement it in a large project How to serialize and deserialize a Class How to write and read a JSON file What is *args and how to use it What is **kwargs and how to use it How to handle named arguments in a function
File | Description |
---|---|
0-read_file.py | reads a text file (UTF8) and prints it to stdout |
1-number_of_lines.py | returns the number of lines of a text file |
2-read_lines.py | reads n lines of a text file (UTF8) and prints it to stdout |
3-write_file.py | writes a string to a text file (UTF8) and returns the number of characters written |
4-append_write.py | appends a string at the end of a text file (UTF8) and returns the number of characters added |
5-to_json_string.py | returns the JSON representation of an object (string) |
6-from_json_string.py | returns an object (Python data structure) represented by a JSON string |
7-save_to_json_file.py | writes an Object to a text file, using a JSON representation |
8-load_from_json_file.py | creates an Object from a “JSON file” |
9-add_item.py | adds all arguments to a Python list, and then save them to a file |
10-class_to_json.py | eturns the dictionary description with simple data structure (list, dictionary, string, integer and boolean) for JSON serialization of an object |
11-student.py | retrieves a dictionary representation of a Student instance (same as 10-class_to_json.py) |
12-student.py | retrieves a dictionary representation of a Student instance (same as 11-class_to_json.py) |
13-student.py | retrieves a dictionary representation of a Student instance (same as 12-class_to_json.py) |
14-pascal_triangle.py | returns a list of lists of integers representing the Pascal’s triangle of n |