What does the dir function do in python

0 votes
Can you show the implementation as well?
Aug 6, 2019 in Python by Waseem
• 4,540 points
929 views

1 answer to this question.

0 votes

The dir() function returns all properties and methods of the specified object, without the values. This function will return all the properties and methods, even built-in properties which are the default for all object.

import random
print(dir())

This will print all the properties and methods of the specified object.

answered Aug 6, 2019 by Mohammad
• 3,230 points

Related Questions In Python

0 votes
1 answer

What does the random.triangular(low, high, mode) function do in python?

It returns a random floating point number ...READ MORE

answered May 27, 2019 in Python by Vinod
1,085 views
0 votes
1 answer

What does the return statement do in Python?

The print() function is use to write ...READ MORE

answered Oct 1, 2018 in Python by SDeb
• 13,300 points
1,367 views
+1 vote
1 answer

What does the Raise keyword do in Python?

Hi! I think I can answer this - ...READ MORE

answered Jan 25, 2019 in Python by Nymeria
• 3,560 points
1,127 views
0 votes
1 answer

What does numpy.reshape() function do in python?

numpy.reshape() gives a new shape to an ...READ MORE

answered May 29, 2019 in Python by Kyraa
1,105 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,070 views
0 votes
1 answer

What does the operator "/=" do in python?

x = 20 res = x /= 5 print(res) The ...READ MORE

answered Aug 2, 2019 in Python by Mohammad
• 3,230 points
846 views
0 votes
1 answer

What does super() function do in python?

Super function calls the parent class method ...READ MORE

answered Aug 2, 2019 in Python by Mohammad
• 3,230 points
806 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP