Python Dir Exercises
Let’s check out some exercises that will help you understand Python’s dir() function better.
Exercise 5-a
Take a look at the attributes and methods of the str class.
Exercise 5-b
Now print the attributes and methods of a list.
Exercise 5-c
Can you print the attributes and methods of a dictionary?.
Need More Exercises?
Check out Holy Python AI+ for amazing Python learning tools.
*Includes 14 more programming languages, inspirational tools and 1-on-1 consulting options.
*Includes 14 more programming languages, inspirational tools and 1-on-1 consulting options.

Umut Sagir
Finance & Data Science Professional,
Founder of HolyPython
Founder of HolyPython