Last active
May 18, 2026 22:12
-
-
Save Robotics-now/16f67688b8825f08e88e39cf3e532d61 to your computer and use it in GitHub Desktop.
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 requests | |
| user_input = input("Enter a word to look up: ") | |
| api_url = f"http://current.domain/api/your_api_key/eng/{user_input}" | |
| response = requests.get(api_url) | |
| data = response.json() | |
| if response.status_code == 200: | |
| data = response.json() | |
| lis = [] | |
| for entry in data["results"]: | |
| lis.append(entry['definition']) | |
| count = 1 | |
| for i in lis: | |
| print(f'{count}. {i}') | |
| count += 1 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the example code for the Dictionary OPEN api.