211人加入学习
(0人评价)
Python编程快速入门

零基础入门Python(利用Jupyter Notebook实现)

价格 ¥ 39.00
承诺服务
该课程属于 Python数据分析师集训班试听课 请加入后再学习

## 循环结构

tang = 0
while tang < 5:
    print(tang)
    tang += 1

 

tangs = set(['tang','yu','di'])
while tangs:
    tang = tangs.pop()
    print(tang)

 

tang = [10,11,12,13,14,15]
for i in tang:
    if i%2 == 0:
        print(i)
    else:
        continue
    print(i)

tang = [10,11,12,13,14,15]
for i in tang:
    if i%2 == 0:
        print(i)
    else:
        break
    print(i)

[展开全文]

P循环结构:if while for continue break

do

while sth

    print

    do

 

a={}

while a:

    b=a.pop()

    print (b)

 

a=set([])

for i in a:

   print(a[i])

 

for i in tang

    if i%2==0

    print(i)

    else:

       continue 继续执行

    print(i)

 

for i in tang

    if i%2==0

    print(i)

    else:

       break  跳出循环

    print(i)

 

 

[展开全文]

课程特色

视频(25)
下载资料(1)