()
| 10 | |
| 11 | |
| 12 | def return_quote(): |
| 13 | response = requests.get("https://zenquotes.io/api/random") |
| 14 | json_data = loads(response.text) |
| 15 | quote = ( |
| 16 | json_data[0]["q"] + " -" + json_data[0]["a"] |
| 17 | ) # aligning the quote and it's author name in one string |
| 18 | return quote |
| 19 | |
| 20 | |
| 21 | quote = return_quote() |