Есть много подходов для этого.Вы можете просто создать файл при первом запуске программы.
first_time=False
fn='config.txt'
try:
file = open(fn, 'r')
except IOError:
file = open(fn, 'w')
first_time=True
if(first_time):
print("This is the first time")
#you tutorial code can go here