Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve 2023 day 01 #31

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Solve 2023 day 01 #31

wants to merge 8 commits into from

Conversation

katzuv
Copy link
Owner

@katzuv katzuv commented Dec 1, 2023

No description provided.

@katzuv katzuv added the solution Puzzle solution label Dec 1, 2023
@katzuv katzuv self-assigned this Dec 1, 2023
@katzuv katzuv marked this pull request as ready for review December 2, 2023 11:26
for line in input_text.splitlines():
new_line = line[0]
for i in range(1, len(line)):
current_part_of_line = line[: i + 1]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of constructing new strings, you can pass startswith/endswith the start/end indices.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored in ce1f570.

@katzuv katzuv requested a review from YoniKF December 2, 2023 12:46
@YoniKF YoniKF removed their request for review February 25, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution Puzzle solution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants