Chinaunix首页 | 论坛 | 博客
  • 博客访问: 377440
  • 博文数量: 138
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1620
  • 用 户 组: 普通用户
  • 注册时间: 2013-03-10 16:55
个人简介

当你比别人优秀一点点,别人会嫉妒你。当你比别人优秀很多,别人会羡慕你。

文章分类

全部博文(138)

文章存档

2016年(2)

2015年(2)

2014年(15)

2013年(119)

我的朋友

分类: LINUX

2016-11-10 15:17:02

'''
Readme:
This script shows the algrothm that list all element but process the last
one specially, while do not know which one is the last one
Need two pointers:
      one for current element and the other one for the next element
'''
current = next = read (directory)
while (next = read() != NULL):
    print current + ', which is not the last one'
    current = next


#after the while, current point to the last one
print current + ', is the last one'

阅读(1479) | 评论(0) | 转发(0) |
0

上一篇:emacs 配色丢失找回来

下一篇:没有了

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