Update template.py
This commit is contained in:
parent
689eb31357
commit
5cd143fcb5
@ -2,10 +2,12 @@
|
||||
"""
|
||||
Jour DAY du défi Advent Of Code pour l'année YEAR
|
||||
"""
|
||||
import os
|
||||
|
||||
def read_sample():
|
||||
"""récupère les entrées depuis le fichier texte correspondant"""
|
||||
with open('inputs/dayDAY.txt', 'r') as f:
|
||||
filename = os.path.join(os.path.dirname(__file__ ), "inputs", "dayDAY.txt")
|
||||
with open(filename, 'r') as f:
|
||||
sample = f.read().split('\n')
|
||||
sample = [ i for i in sample if i != '' ]
|
||||
return sample
|
||||
|
Loading…
Reference in New Issue
Block a user