📜  python代码示例中的案例

📅  最后修改于: 2022-03-11 14:46:30.001000             🧑  作者: Mango

代码示例3
def week(i):
    switcher={
        0:'Sunday',
        1:'Monday',
        2:'Tuesday',
        3:'Wednesday',
        4:'Thursday',
        5:'Friday',
        6:'Saturday'
    }
    return switcher.get(i,"Invalid day of week")

print(week(5)) # Call the function