我想让我的代码处于活动状态,但是如果我只输入一次,那么程序将跳出
def make_album(artist_name,album_name):
album = {'artist':artist_name,'album':album_name}
return album
active = True
artist_album_list =[]
while active :
artist = input("(If you want to finish the work,please enter 'q')\n"
"Please enter the artist that you want to save:")
album = input("(If you want to finish the work,please enter 'q')\n"
"Please enter the album name that you want to save: ")
cc= make_album(artist,album)
artist_album_list.append(cc)
if artist or album == 'q':
break
else:
active =True
print(cc)