Is there a way to list out in-built variables and functions of Python?

0 votes

Hi. I recently found out about the dir() method that lists out the names that a module provides. To use this, you need to import a module and then use the dir() method. 

import datetime
dir(datetime)

I was just wondering if there is a way to list out the in-built functions. Because, we don't import any module to use the in-built functions or names, so how can we list the in-built names?

6 days ago in Python by Yash
6 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

The in-built variables and functions are defined in the builtins modules. So you can use the dir() method on this module to list the names. For example:

>>> import builtins
>>> dir(builtins)
answered 6 days ago by Junaid

Related Questions In Python

0 votes
1 answer

Is there a foreach function in python and is there a way to implement it if there isnt any

Every occurence of "foreach" I've seen (PHP, ...READ MORE

answered Aug 31, 2018 in Python by charlie_brown
• 7,710 points
41 views
0 votes
1 answer

What is the recommended way to randomize a list of strings using Python?

Hi. Nice question. Here is the simplified answer ...READ MORE

answered Jan 18 in Python by Nymeria
• 3,500 points
30 views
0 votes
1 answer

Is there a way to run Python on Android?

YES! An example via Matt Cutts via SL4A -- "here’s ...READ MORE

answered Sep 19, 2018 in Python by Priyaj
• 56,100 points
24 views
0 votes
1 answer

Is there a way of using .lower more effectively in tkinter?

Here is a simple function and some ...READ MORE

answered Sep 25, 2018 in Python by Priyaj
• 56,100 points
69 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 920 points
19 views
+4 votes
6 answers
0 votes
1 answer

Is there a string 'contains' in python?

In this case, you can use the ...READ MORE

answered Sep 25, 2018 in Python by SDeb
• 9,380 points
44 views
0 votes
1 answer

How to find out which functions a Python module contains?

Yes, you can do this. Python allows ...READ MORE

answered 6 days ago in Python by Raj
9 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.