Given that @jonrsharpe already provided a solid answer on the specific problem, I'd like to add some additional information on learning Python or any language in general, and how much math may be necessary.
Many tutorials teach programming by recreating problems with known solutions, a method often considered "reinventing the wheel" or "reimplementing the wheel". This strategy will teach you how to solve a given problem and how to approach problems with similar nature.
However in order to make for a productive learning process you should focus on problems that you can reason about or for which you can visualize a way towards a solution. Otherwise you will get lost between the two things that you will need to learn: the tool (programming language) and the strategy (in this case, using math).
My suggestion, think of something that you want to do. Start with simple tasks like reading text files, parsing and transforming text, or small games like tic-tac-toe, hangman, simon and other memory games. Then break the problem into smaller problems that you can solve. For instance, you may not know how to draw a tic-tac-toe board, so first you would learn how to draw a line and a circle. Then you may not know how to make the computer smart and have it play against you, so instead make the game so you play against another person, and so on.
If you are just starting with programming, have a look at the exercises from Code Club. They are somewhat basic but still challenging.
Once you feel comfortable with the Python language, start looking at code written by other people. Since Python modules are generally open-source, you can search for any topic you might find interesting at PyPi and study how other people solved the problem.
If at any point you feel lost, you can also join the #Python channel on the Freenode IRC network where, with some patience, you will find someone willing to help you and give you some guidance.