Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae2114a

Browse files
committed
add loop
1 parentd310048 commitae2114a

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
##代码规范
77
*http://ssv.sebug.net/Python_Coding_Rule
8+
89
##学习资源
910
*[简明 Python 教程](http://sebug.net/paper/python/index.html)
1011
*[crossin的编程教室](http://crossin.me/forum.php?mod=forumdisplay&fid=2)

‎loop.py‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# range(start, stop[, step])
2+
foriinrange(0,5):
3+
printi;
4+
print'==============';
5+
6+
foriinrange(0,5,2):
7+
printi;
8+
print'==============';
9+
10+
foriin [0,1,2]:
11+
printi;
12+
print'=====for end =========';
13+
14+
i=0;
15+
whilei<5:
16+
printi;
17+
i+=1;
18+
19+
print'==============';
20+
21+
i=0;
22+
whileTrue:
23+
ifi>=5:
24+
break;
25+
else:
26+
i+=1;
27+
ifi%2==1:
28+
continue;
29+
printi;
30+
31+
print'==============';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp