1.for 循环
①for num in range(1,11): print(str(num)+‘ + 1 = ‘,num + 1) ②song_list = [‘Holy Diver‘,‘Thunderstruck‘,‘rebel rebel‘]for song in song_list: if song == ‘Holy Diver‘: print(song,‘-Dio‘) elif song == ‘Thunderstruck‘: print(song,‘-AC/DC‘) elif song == ‘rebel rebel‘: print(song,‘- DAVAID BOWIE‘)
时间: 2024-10-25 02:27:37