gpt4 book ai didi

python - raw_input 应该只接受单个字符

转载 作者:行者123 更新时间:2023-11-28 19:35:46 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Python read a single character from the user

我正在使用下面的代码。但它允许用户输入多个字符,而不是接受单个字符。

我该如何解决?

guess = raw_input(':')
guessInLower = guess.lower()

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com