Skip to content

Instantly share code, notes, and snippets.

@IshamMohamed
Created November 22, 2013 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IshamMohamed/7597816 to your computer and use it in GitHub Desktop.
Save IshamMohamed/7597816 to your computer and use it in GitHub Desktop.
This is a Python implementation of Meanings API from Easy APIs Project (http://gcdc2013-easyapisproject.appspot.com/) to get input from user and give meanings.
import urllib2
print "Enter a word:",
q = raw_input() #get word from user
response = urllib2.urlopen('http://gcdc2013-easyapisproject.appspot.com/meanings?q='+q)
html = response.read()
html = html[1:] #remove first {
html = html[:-1] #remove last }
html = html.split('}{') #split and put each resutls to array
for meanings in html:
print meanings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment