2022-05-04
Python provides two built-in functions for sorting: list.sort(): modifies the list in-place sorted(): builds a new sorted list from an iterable Difference between these methods: list.sort() method is only defined for lists.
2022-05-02
2022-05-01
2022-05-01
2022-05-01
In-depth look at the Python built-in handling for strings.
2022-05-01
Source: RealPython Reading Input From the Keyboard input([<prompt>]): Reads a line from the keyboard. (Documentation) pauses program execution to allow the user to type in a line of input from the keyboard
2022-04-28
Just to mark down some issues I have met when using matplotlib.pyplot for plotting. Change global font to Times New Roman import matplotlib.pyplot as plt plt.rcParams['font.family'] = 'DeJavu Serif' plt.rcParams['font.serif'] = ['Times New Roman'] Source: Matplotlib cannot find basic fonts
2022-01-23
TL;DR Before committing any staged Python files, pre-commit automatically formats the code, validates compliance to PEP8, and performs different types of checking to keep the code and the project clean. This automatical process can greatly save our time on code formatting so that we can concentrate on code logic.
2021-11-01
Why patblib? The pathlib module, introduced in Python 3.4 (PEP 428), gathers the necessary functionality in one place and makes it available through methods and properties on an easy-to-use Path object.
2020-12-26