I'd like to use the same function twice but change which class attribute the function will use. It would look similiar to below:
class Player:
def __init__(self):
self.primary_color = 'blue'
self.secondary_color = 'pink'
def show_color(self, color_attribute)
print(color_attribute)
player = Player
print(player.show_color(primary_color))
>>>'blue'
print(player.show_color(secondary_color))
>>>'pink'
This particular color example may not be very helpful but the project I'm working on would greatly benefit from this ability.