An attribute is data associated with a Python object. It represents part of the object's state, while methods provide behaviors that can access or change that state. section 2.2.2
In a class:
- The initializer, __init__, commonly creates the initial attributes. section 2.2.2
- Related attributes and methods together form the members of a class. section 2.2.2
Rock-paper-scissors state
A simulator initializes self.computer_choice and self.human_choice to None. Its choice methods later assign values to those attributes, and print_choices reads them through self.

























