Install and read the quick tutorial of Requests: http://www.python-requests.org/en/latest/
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
colors_list = ['blue', 'blue', 'green', 'yellow', | |
'blue', 'green', 'red'] | |
sample_dict = { | |
'a': 1, | |
'b': 'hello', | |
'c': [1, 2, 3] | |
} |
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
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() |
- Read the developer documentation of Forecast.io's API: https://developer.forecast.io/
- Register to get your developer key
- Use the Requests library and JSON to get a weekly forecast in degree Celsius (°C)
- Print the min and max temperature and the amount of rain forecasted for the next 7 days
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
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 |
Download the following file as words.txt
: http://paste.ee/r/Fwje8
Organize the words into anagram groups.