r/learnpython • • Dec 02 '19

Advent of Code (AoC) 2019 starts today!

https://adventofcode.com/

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

These puzzles are a great way to practice your Python and problem solving skills.

Edit: added description from AoC site.

336 Upvotes

40 comments sorted by

View all comments

2

u/jlamores Dec 02 '19

Talking about the first puzzle.

I am an absolute beginner reading right now through the list chapter of the Python Crash Course. To solve the first puzzle I think I have to make a list with all the data and use a "for loop", but I dont know how to write all this numbers to create my list. How do you do it? You copy and paste in your code? But you don't have the commas so....

2

u/CleverBunnyThief Dec 02 '19

That's what I did. Copied, pasted then added the commas after.

1

u/MiataCory Dec 02 '19

Just FYI: An "End of line" character is present, even though a comma isn't.

.readline()

1

u/CleverBunnyThief Dec 02 '19

That's good to know for the future.

Thanks!