Money and Business

Money and Business

Be careful when reading a csv with a comma followed by a space in Python

In Python, you can easily read and write csv files using the standard csv module.csv — CSV File Reading and Writing — Py...
Money and Business

Create pip.conf and remove the pip list warning

I updated pip to 9.0.1 and now I get a warning message in the pip list command.DEPRECATION: The default format will swit...
Money and Business

Valid and invalid names and naming conventions for identifiers (e.g. variable names) in Python

In Python, identifiers (names of variables, functions, classes, etc.) need to be defined according to rules. Names that ...
Money and Business

Writing long strings of text on multiple lines in Python

If you use a PEP8 compliant code checker such as flake8 in Python, you will get the following error when a line exceeds ...
Money and Business

To see a list of Python keywords (reserved words), use the keyword

A list of Python keywords (reserved words) can be found in the keyword module of the standard library.keyword — Testing ...
Money and Business

Check and change the Python recursion limit (e.g. sys.setrecursionlimit)

In Python, there is an upper limit to the number of recursions (the maximum number of recursions). To execute a recursiv...
Money and Business

Getting, adding, overwriting, and deleting environment variables in Python (os.environ)

Environment variables can be retrieved, checked, set (added or overwritten), and deleted in Python programs using os.env...
Money and Business

Getting the location (path) of a running file in Python: __file__.

To get the location (path) of a running script file in Python, use __file__. This is useful for loading other files base...
Money and Business

Get and change (move) the current directory in Python

This section explains how to get, check, and change (move) the working directory (current directory) where Python is run...
Money and Business

Get information about the OS and version of Python running in the environment.

The standard library platform module is used to get information about the operating system on which Python is running an...
Copied title and URL