Download the following file as words.txt
: http://paste.ee/r/Fwje8
Organize the words into anagram groups.
Download the following file as words.txt
: http://paste.ee/r/Fwje8
Organize the words into anagram groups.
def print_table(): | |
lookup = ['-', 'X', 'O'] | |
for row in T: | |
print ' '.join([lookup[cell] for cell in row]) | |
def move(player, row, column): | |
global next_player |
Install and read the quick tutorial of Requests: http://www.python-requests.org/en/latest/
import time | |
def is_anagram(word1, word2): | |
# sorted converts to list by characters and sorts | |
return sorted(word1) == sorted(word2) | |
def reduce_list(mylist, reduce_factor): | |
new_list = list() |
colors_list = ['blue', 'blue', 'green', 'yellow', | |
'blue', 'green', 'red'] | |
sample_dict = { | |
'a': 1, | |
'b': 'hello', | |
'c': [1, 2, 3] | |
} |