What happens when the following code segment executes if test.txt does not exist?:
A,B,C,D?

The answer is A.
In Python, if test.txt does not exists then opening it with mode 'w' will create new empty file.