When I print out sys.path in python it apparently always starts with apostrophes denoting an empty string '', why is that?
import sys
print(sys.path)
# ['', and/some/other/paths]
When I print out sys.path in python it apparently always starts with apostrophes denoting an empty string '', why is that?
import sys
print(sys.path)
# ['', and/some/other/paths]
From the documentation,
As initialized upon program startup, the first item of this list, path[0], is the directory containing the script that was used to invoke the Python interpreter. If the script directory is not available (e.g. if the interpreter is invoked interactively or if the script is read from standard input), path[0] is the empty string, which directs Python to search modules in the current directory first.