腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
搜索
关闭
文章
问答
(9999+)
视频
开发者手册
清单
用户
专栏
沙龙
全部问答
原创问答
Stack Exchange问答
更多筛选
回答情况:
全部
有回答
回答已采纳
提问时间:
不限
一周内
一月内
三月内
一年内
问题标签:
未找到与 相关的标签
筛选
重置
4
回答
Python
:
while
(
True
!=
True
)循环
#Can be set to
True
if
while
(run !=
True
) is set to
while
(run ==
True
).
while
(run !=
True
) : cont() 我的问题是,为
浏览 2
修改于2015-08-14
得票数 0
回答已采纳
3
回答
除了ValueError之外的
Python
:
While
True
我尝试使用'
while
true
‘来要求用户输入0或一个正整数。我尝试了几种不同的方法,它们似乎都有不同的问题。函数def positive_int拒绝字母和负整数,但不允许阶乘函数工作。def positive_int(prompt=''): try: num = int(input(prompt))
浏览 12
修改于2020-04-27
得票数 0
回答已采纳
2
回答
Python
while
true
条件引发语法错误
def add(x, y):
while
True
: num1 = float(input('Enter first number: '
浏览 0
修改于2018-10-25
得票数 0
1
回答
Python
3
while
True
:循环
我正在努力在我的代码中实现
while
True
:循环。/usr/bin/
python
3 config = { 'use_own_ip':
浏览 0
提问于2016-05-26
得票数 0
4
回答
python
repeat program
while
true
我试图让我的程序在用户输入y/n时重复,但是我对如何在这种类型的输入中使用
while
true
感到困惑,下面是一些代码。
浏览 0
提问于2012-09-24
得票数 1
回答已采纳
1
回答
如何在
Python
中将
while
True
更改为
while
False?
def stat(): driver.get(webs) def spinning_cursor(): for cursor in '|/-\\':
while
stat():
浏览 33
修改于2019-05-12
得票数 1
回答已采纳
5
回答
Python
线程和
While
True
循环
我有一个将行附加到self.output的线程和一个运行到self.done为
True
(或达到最大执行时间)的循环。
while
True
: yield self.output.pop(0) elif self.done
浏览 0
提问于2009-04-30
得票数 10
回答已采纳
1
回答
事件驱动环境中的
Python
Turtle ` `
While
True
`
我在Stack Overflow上读到过几篇文章,“像turtle这样的事件驱动环境永远不应该有
while
True
:,因为它可能会阻塞事件(例如键盘)。”下面是一个
Python
Turtle程序,它看起来工作得很好,但它使用了
while
True
:构造。 move_snake() time.sleep
浏览 14
提问于2020-03-07
得票数 1
回答已采纳
17
回答
在
Python
中"
while
True
“是什么意思?
def play_game(word_list):
while
True
: cmd =我认为说'
while
true
‘是一种速记,但是为了什么呢?当变量'hand‘被赋值时?如果变量'hand‘没有被赋值怎么办?
浏览 2
修改于2020-02-13
得票数 105
4
回答
Python
中使用
while
true
的数字数
我正在
Python
3.6.1上编写一个程序,它计算用户给定数字的数字数。我使用的是句子“而不是真”,而不是函数或字符串,因为我还没有学会使用它们。这是我的代码:cont=0 number=number/10 cont=cont+1
浏览 7
提问于2017-07-04
得票数 1
回答已采纳
2
回答
陷入“
while
True
”循环
python
我刚刚学习了
Python
语言中的break和return。def break_return(): for i in range(5): if i < 2:
浏览 25
修改于2018-09-10
得票数 1
回答已采纳
2
回答
插入
while
True
循环
python
我陷入了一个似乎无法打破的
while
True
循环中,有什么建议请提出来:master, slave = pty.openpty() process = Popen(command1, shell=
True
, stdin=PIPE, stdout=sl
浏览 0
修改于2014-04-22
得票数 0
1
回答
Python
在"
while
True
“中一直要求提供raw_input
我需要
python
不断询问raw_input答案是否与1或2不同。print """What do you want me to do?
while
True
: .... print "I need 1 or 2" 问题是,
浏览 1
修改于2016-09-19
得票数 0
1
回答
可以在
python
中将"
while
True
: with x as y:“转换为"
while
x as y”循环吗?
我想知道是否有可能加入with和
while
True
循环,因为
while
True
非常简单(一直运行到有东西破坏它),而且有点浪费缩进。self.num = 5 return self pass with Something() as s:如果可能,我如何将其更改为类似于此
浏览 1
提问于2015-12-01
得票数 0
1
回答
在
python
中使用
while
true
和if函数的麻烦
,票价为12美元,否则票价为18美元” n = int(input("Insert your age : ")) #asking for users age if n > 0 : return nelse : def price_
浏览 7
提问于2022-11-30
得票数 -1
回答已采纳
6
回答
Python
,
While
-
True
循环,获取整数并返回相同长度的单词
lenword(num)示例 wrdlst = [ 'i' , 'to', 'two', 'four']#stuck here #returns
浏览 0
修改于2020-06-20
得票数 0
1
回答
Python
If-Condition with
While
-
True
无限循环冲突
我想问一下,现在我正在做
python
3 http web服务器。然而,当它停留在“
while
-
true
”时,它在“if-condition”上有问题。当我想使用其他“if条件”时,程序停留在“
while
-
true
”,不能继续执行其他程序。satu.py ;", shell=
True
) subprocess.run("
python
3 dua.py ;", shell=
True
)
while</e
浏览 0
修改于2021-09-01
得票数 0
1
回答
背景中的无限
While
True
循环(
Python
)
基本上,我有一些这样的代码: number = int(len(oilrigs)) * 49 time.sleep(1)那么如何将代码放在后台呢?
浏览 0
修改于2016-07-08
得票数 7
回答已采纳
2
回答
python
在使用` `
while
true
`循环意外退出后重新启动
我用
while
true
编写了一个
python
脚本来执行捕获电子邮件附件的任务,但有时l发现它会在服务器上意外退出。 L在本地运行了4个多小时,没有任何问题,所以l可以确认代码是正确的。那么,有没有一种机制可以在
python
意外退出时重启它,比如进程监控?我是linux的新手。备注:l运行此
python
脚本,就像在shell脚本中运行
python
attachment.py &一样。
浏览 0
修改于2017-12-20
得票数 0
4
回答
为什么这段代码不能打破
python
中的
while
True
循环呢?
今天早些时候刚开始学习
python
,我不明白如果输入"N“,为什么这段代码不会结束程序。另外,如果我将最后一条if语句改为!= "Y“,那么即使我键入Y,它也会关闭,这让我非常困惑。
while
True
: print("Is the temperature you'd like to convert in Fahrenheit(Y/N) ")) <
浏览 9
提问于2020-07-26
得票数 0
第 2 页
第 3 页
第 4 页
第 5 页
第 6 页
第 7 页
第 8 页
第 9 页
第 10 页
第 11 页
点击加载更多
领券