有什么捷径可以达到APT的目的吗?(Advanced Package Tool)命令行接口在Python中做什么?
发布于 2018-03-27 11:11:00
我会这样做:
# raw_input returns the empty string for "enter"
yes = {'yes','y', 'ye', ''}
no = {'no','n'}
choice = raw_input().lower()
if choice in yes:
return True
elif choice in no:
return False
else:
sys.stdout.write("Please respond with 'yes' or 'no'")
https://stackoverflow.com/questions/-100007800
复制相似问题