while 循环和 For 循环在一起

While loop and For loop together

嗨,我想 运行 无限循环到 运行。

例如

while True:

    try:
     script()

except Exception as e:
        script()
        continue

如下,因为在 For 循环中我有列表,我想在其中应用脚本,这些脚本 运行 在排序和连续

while True:
    try:
        for symbol in symbol:
            script()

    except Exception as e:
        for symbol in symbol:
            script()
        continue

我猜你正在尝试 运行 程序,即使出现异常并在某些情况下中断,我想你不希望 运行 无限循环。你可以做到

While true:
    try:
        for symbol in symbols:
            script(symbol) ' you should break however somewhere
    Exception as e:
        continue