Let me quickly tell you how you can see the output your code is producing for a specific input. This will be very helpful to debug your code in case you are stuck !
1. Add a print statement
2. Call the function with a specific input
3. Click on Run Code
For example (see image below) -

When you do that you can see the logs as you can see below
