网站水印怎么做的,国外建筑公司网站,免费ppt模板下载大全 完整版无需会员,织梦网站名称改不了我写了一个手动输入后收集专辑信息的程序#xff0c;写的很繁杂......是定义了一个可以将实参整理入字典的函数#xff0c;再将字典放入列表
album_list []
def album(name, singer, quantities_of_songs):
record the info of a album…我写了一个手动输入后收集专辑信息的程序写的很繁杂......是定义了一个可以将实参整理入字典的函数再将字典放入列表
album_list []
def album(name, singer, quantities_of_songs):
record the info of a album
info {name: a, singer: b, numbers : c}
return info
while True:
a input(input the name.\ninput q to exit\n)
if a q :
b c q
break
b input(input the singers name\n)
if b q:
c q
break
c input(input the number of songs\n)
if c q:
break
recorded_album album(a, b, c)
album_list.append(recorded_album)
question input(do you have any other album?(yes/no))
if question no:
break
if a and b and c ! q:
print(\n*3)
print(album_list)
然而最后print出来的list是多个字典紧挨着排列在一起的能否在每个元素之间插入空行使结构整洁一点