import os
dirname = os.path.dirname(__file__)
fname = 'greet.txt'
fpath = os.path.join(dirname, fname)
with open(fpath, mode='w', encoding='utf_8') as f:
    f.write('Hello world!')
print('Finished!')

06453b9708db3ff44eb13345ae50ef9e8d9a39bf
<mask token>

<mask token>
with open(fpath, mode='w', encoding='utf_8') as f:
    f.write('Hello world!')
print('Finished!')

<mask token>
dirname = os.path.dirname(__file__)
fname = 'greet.txt'
fpath = os.path.join(dirname, fname)
with open(fpath, mode='w', encoding='utf_8') as f:
    f.write('Hello world!')
print('Finished!')

import os
dirname = os.path.dirname(__file__)
fname = 'greet.txt'
fpath = os.path.join(dirname, fname)
with open(fpath, mode='w', encoding='utf_8') as f:
    f.write('Hello world!')
print('Finished!')
