-
-
Save weisi/735fcb903511f52074ef to your computer and use it in GitHub Desktop.
Python: Comment Matters
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
# tab-width: 4 | |
import sys | |
arr = ["Segment", "Fault"] | |
space = " " | |
nl = "\n" | |
for i in range(5): | |
for item in arr: | |
sys.stdout.write(item) | |
sys.stdout.write(space) | |
sys.stdout.write(nl) |
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
# tab-width: 8 | |
import sys | |
arr = ["Segment", "Fault"] | |
space = " " | |
nl = "\n" | |
for i in range(5): | |
for item in arr: | |
sys.stdout.write(item) | |
sys.stdout.write(space) | |
sys.stdout.write(nl) |
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
[multiple1902@aurora /t/python] python a.py | |
Segment Fault | |
Segment Fault | |
Segment Fault | |
Segment Fault | |
Segment Fault | |
[multiple1902@aurora /t/python] python b.py | |
Segment | |
Fault | |
Segment | |
Fault | |
Segment | |
Fault | |
Segment | |
Fault | |
Segment | |
Fault |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment