📌  相关文章
📜  如何在 python 中设置输入限制 - TypeScript 代码示例

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

代码示例1
shift = 0
while 1 > shift or 26 < shift:
    try:
        # Swap raw_input for input in Python 3.x
        shift = int(raw_input("Please enter your shift (1 - 26) : "))
    except ValueError:
        # Remember, print is a function in 3.x
        print "That wasn't an integer :("