You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use your solution as reference for the 2021 day 13 puzzle, but when I execute I get the following error:
Traceback (most recent call last):
File "C:/Users/jcroce/develops/c/advent_code_21/p13e/day13p2.py", line 3, in <module>
t, b = data.split("\r\n\r\n")
^^^^
NameError: name 'data' is not defined
If we check the code is clear that the data has not been set. By the look of the code (and testing it) adding the following two lines at the beginning make it work:
import sys
data = sys.stdin.read()
The split on "\r\n\r\n" does not work for me, changing it to "\n\n" makes it work:
t, b = data.split("\n\n")
Anyway, thank you so much for providing such precise solutions, it helps a lot!
The text was updated successfully, but these errors were encountered:
I wanted to use your solution as reference for the 2021 day 13 puzzle, but when I execute I get the following error:
If we check the code is clear that the data has not been set. By the look of the code (and testing it) adding the following two lines at the beginning make it work:
The split on "\r\n\r\n" does not work for me, changing it to "\n\n" makes it work:
Anyway, thank you so much for providing such precise solutions, it helps a lot!
The text was updated successfully, but these errors were encountered: