Skip to content

Commit

Permalink
Update files
Browse files Browse the repository at this point in the history
  • Loading branch information
thisismudith committed Jul 16, 2022
1 parent 0fb49a2 commit cc5ca7e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 2020/4.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# If you already have the data as an input use:
data = [] # Your Advent Input
# However, it is highly recommended to run this:
location = "C:\\Users\\dagam\\Downloads\\input.txt" # Path of the input.txt provided from Advent Calendar
location = "" # Path of the input.txt provided from Advent Calendar
try:
with open(location,'r') as f:
data = (''.join(f.readlines())).split('\n\n')
Expand Down
13 changes: 13 additions & 0 deletions 2020/5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# If you already have the data as an input use:
data = [] # Your Advent Input
# However, it is highly recommended to run this:
location = "" # Path of the input.txt provided from Advent Calendar
try:
with open(location,'r') as f:
data = f.readlines()
f.close()
except:
pass
data = [o.rstrip('\n') for o in data]
if data[-1] == "'+":
del data[-1]

0 comments on commit cc5ca7e

Please sign in to comment.