Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python While循环中简单计数器的最大限制是什么_Python_While Loop - Fatal编程技术网

Python While循环中简单计数器的最大限制是什么

Python While循环中简单计数器的最大限制是什么,python,while-loop,Python,While Loop,无限While循环中的最大计数整数是多少 count = 0 while True: c += 1 print(c) Python3是否为int.maxsize?您可以使用标准库的sys模块进行检查 最大整数大小 最小整数大小 Python可以处理任意长度的整数。所以,限制因素是你的记忆力。这有助于回答你的问题吗? >>> sys.maxint 9223372036854775807 >>> -sys.maxint - 1 -9223372

无限While循环中的最大计数整数是多少

count = 0
while True:
    c += 1
    print(c)
Python3是否为int.maxsize?

您可以使用标准库的sys模块进行检查

最大整数大小

最小整数大小


Python可以处理任意长度的整数。所以,限制因素是你的记忆力。这有助于回答你的问题吗?
>>> sys.maxint
9223372036854775807
>>> -sys.maxint - 1
-9223372036854775808