In this challenge we will be exercises our skills in:
- Using python libraries
- Using if constructs
- Using for construct
- Using methods
The requirement we need delivered is.
As a reader, I want the system to ask me for the post ID that am interestd in and then fetch the post for me.
As a reader, I want the system to return "None" if the post I requested is not available
You should fetch the posts from https://jsonplaceholder.typicode.com/posts
Hint:
- Use urllib to fetch the data
- Remember to decode the content from the website to utf-8 once fetched. By default urllib gives you content in bits, you want it in string before json decoding
- Use json library for decoding to a list
- Execute your search using for loop