Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Justin Noor3,692 Points
What are the bracket for in self.current_score = [0, 0] ?
I got this to work but never fully understood what the brackets are for in the self.current_score = [0, 0] line.
self.current_score = [0, 0]
Andrew Smith10,947 Points
The brackets create a list. The first item in the list tracks Player 1's score while the second track's Player 2's score. The method you are asked to create takes the argument which tells you which player scored and you increase either the first or second item in the list based on that argument.
The brackets is a list that hold default values. Each player starts with a score of 0.