Created
October 25, 2012 08:12
-
-
Save kvzhuang/3951354 to your computer and use it in GitHub Desktop.
Seven quatrains in python
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
''' | |
今天詩興大發,寫了一首七言絕句. | |
I wrote a Seven quatrains in python. | |
''' | |
a = [1, 2, 3, 4, 5, 6, 7] | |
print a[0:8] | |
print a[::-1] | |
print a[0:7:2] + a[1:7:2] | |
print [x*2 for x in range(1,4)] + [x*2-1 for x in range(1,5)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment