📜  使用带有字符限制的 Python 的用户名提示 - Python 代码示例

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

代码示例1
Username = input("What is your username? ")
UsernameLength = len(Username)
if UsernameLength <= 10:
  print(f'Your Username is {Username}')
elif UsernameLength >= 10:
  print("Username is too long! (MAXIMUM IS 20 CHARACTERS)")
  exit()