Chinaunix首页 | 论坛 | 博客
  • 博客访问: 761016
  • 博文数量: 140
  • 博客积分: 10288
  • 博客等级: 上将
  • 技术积分: 2895
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-03 13:19
文章分类

全部博文(140)

文章存档

2009年(50)

2008年(90)

我的朋友

分类: Python/Ruby

2009-04-13 21:08:18

 if 语句的基本语法
if(expression one):
    # Action to take if expression one evaluates True
else:
    # Action to take if all expression one evaluates False
还包括elif
 
while 循环的伪代码
while (expression):
    # statements to execute while loop expression is True
else:
    # statements to execute when loop expression is False
 
 
for 循环的伪代码
for item in container:
    # action to repeat for each item in the container
else:
    # action to take once we have finished the loop.
 
 
阅读(1125) | 评论(0) | 转发(0) |
0

上一篇:[转]Python的缩进

下一篇:[转]Python新特性

给主人留下些什么吧!~~