Combining Methods

Learn how to use methods within methods.

We'll cover the following

We’ve discussed how to define a method and how to call it. What if one method isn’t enough? What if methods need to do more complicated things?

Callings methods from another method

For example, we could rewrite our add_two method using another add_one method and simply call it twice:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy