Let’s take a closer look at why you use len(string) and str(object), but dot notation (such as "String".upper()) for the rest.

lion = "roar" len(lion) lion.upper()

Methods that use dot notation only work with strings.

On the other hand, len() and str() can work on other data types.



On line 3, call the len() function with the argument ministry.

On line 4, invoke the ministry‘s .upper() function.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?