python小程序

来源:互联网 发布:电话短信轰炸机软件 编辑:程序博客网 时间:2024/05/18 03:20

摘要

实现这样一个程序,歌曲列表中有三首歌”Holy Diver,Thunderstruck,Rebel Rebel”,当播放到每首时分别显示对应的歌手名字”Dio,AC/DC,David Bowie”

songslist = ['Holy Diver','Thunderstrunk','Rebel Rebel']for song in songslist:    if song == 'Holy Diver':        print(song,'- Dio')    elif song == 'Thunderstrunk':        print(song,'- AC/DC')    elif song == 'Rebel Rebel':        print(song,' -David Bowie')

原创粉丝点击