已知字典day = {1:'Monday',2:'Thursday',3:'*day',4:'Whatday?',5:'Mayday',6:'Saturday'},使用update()方法编程,把一周7天的字典完善好,并将新字典打印出来。
时间: 2024-01-16 11:03:23 浏览: 207
day = {1:'Monday',2:'Thursday',3:'*day',4:'Whatday?',5:'Mayday',6:'Saturday'}
day.update({7:'Sunday', 3:'Wednesday'})
print(day) # {1: 'Monday', 2: 'Thursday', 3: 'Wednesday', 4: 'Whatday?', 5: 'Mayday', 6: 'Saturday', 7: 'Sunday'}
阅读全文