day 1 #5
Unanswered
purplelemons-dev
asked this question in
Q&A
Replies: 1 comment
-
Try running through the logic on the string Let me also recommend the subreddit as a place to ask general questions; there's an army of people waiting to answer there. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello! i was working on day one and got to part 2 and ran into some trouble, but i referenced your code and got it to work. my original code looked like:
however, when i changed the replacement to function like your code (
lines = lines.replace(k, f"{k}{v}{k}")
), it worked just fine. so, my question is: why does replacing spelt-out numbers with"one1one"
(in the case ofone
) work, but regular replacement doesn't? this seems unintuitive...Beta Was this translation helpful? Give feedback.
All reactions