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.
![](https://holypython.com/wp-content/uploads/2023/04/PXL_20220305_160849464.MP3-scaled-e1681462509264.jpg)
Umut Sagir
Finance & Data Science Professional,
Founder of HolyPython
Founder of HolyPython