class Song:
def __init__(self, title, artist):
self.title = title
self.artist = artist
def how_many(self, listener):
print(listener)
obj_1 = Song("Mount Moose", "The Snazzy Moose")
obj_1.how_many(['John', 'Fred', 'Bob', 'Carl', 'RyAn'])
obj_1.how_many(['Luke', 'AmAndA', 'JoHn']) here
#监听器内部包含2个列表,我所做的任何事情都会产生两个列表,有没有办法在不更改同时调用how_many方法的对象的情况下将监听器内部的列表分开。谢谢!!!提前