Py学习  »  Python

下面代码python代码的输出是什么

Praveen Kumar • 7 年前 • 2294 次点击  

python

有人能解释一下下面的代码吗

x=0

while x<7:
    if x==5:
        continue
    print(f'value of x is:{x}')
    x+=1

此代码的输出为:

value of x is:0
value of x is:1
value of x is:2
value of x is:3
value of x is:4
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/38884
文章 [ 3 ]  |  最新文章 7 年前