Created
April 11, 2015 13:42
-
-
Save zhao-ji/4c9c18428f30099b651f to your computer and use it in GitHub Desktop.
Python output the Nature Number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Num: | |
'''output the nature number''' | |
num = 0 | |
def next_num(self): | |
yield self.num | |
self.num += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment