Difference between "w" and "w+" flags in Python

Both create the file if it does not exist.

Both truncate the file to zero length upon opening.