This file contains hidden or 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
#Draw A Game Board | |
def make_board(num = 3): | |
for i in range(num): | |
print " ---" * num | |
print "| " * (num + 1) | |
print " ---" * num | |
if __name__ == "__main__": | |
num = int(raw_input()) | |
make_board(num) |
This file contains hidden or 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
#File Overlap | |
f1 = open("Documents\primenumbers.txt", "r") | |
f2 = open("Documents\happynumbers.txt", "r") | |
f2_list = f2.readlines() | |
result = list() | |
for line in f1: | |
if line in f2_list: | |
result.append(line.strip() ) |