Joseph Hart

Grabbing song lyrics using an api is easier then you may think. Not only can you have them right away on your computer, but then you can download them too.

To get started, import the necessary libraries

The API is from api.lyrics.oh. Set your variables for the artist and song you want.

--

--

This is a good thing to try in prep for an interview or just general skills in python. Even if you are not asked in an interview to do this, it is still a good skill to know how to do it.

Let’s start by defining our function.

By defining a function for this, we can create a system that will more easily reverse any string. Creating a function is also more code friendly because it is more general.

--

--

In Python, dictionaries are powerful resources that are capable of storing a lot of information. I. this post, I will show you how to create a dictionary with multiple elements and how to delete one of those items.

Let’s name our dictionary people and add our elements.

We have three keys: Steve, Tim, and Frank. Each of these keys has two values, age and last name. If we want to pull our first item, we will do the following:

--

--

--

--