'''
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'
阅读(1549) | 评论(0) | 转发(0) |