This article mainly introduces the Python built-in function dir. This article describes the command introduction, the use of instances, the use of dir to find all classes under the module, and how to find the classes under the current module, for
1. Command Introduction
Recently learned and used a python built-in function, dir, first help:Copy the Code code as follows:
>>> Help (dir)
Help on built-in function dir in module __builtin__:
Dir ()Dir ([object]), List of strings
Return an
Python built-in functions dir and pythondir
1. Command Introduction
Recently I learned and used a python built-in function dir. First, help:Copy codeThe Code is as follows:>>> Help (dir)Help on built-in function dir in module _ builtin __:
Dir ()Dir
1. Order Introduction
Recently learned and used a Python built-in function dir, first help:
Copy Code code as follows:
>>> Help (dir)
Help on built-in function dir in module __builtin__:
Dir ()Dir ([object])-> list of strings
Method 1: Use dir () to traverse the DirectoryDir () function. If the call succeeds, the Directory class instance is returned.PHP dir () syntax format:Dir (directory); // directory is the name of the directory to display the file name, which can
The python function-dir () has been a little busy recently. after just a year, many things have been accumulated and need to be processed. Therefore, a function can only be updated every two days, I apologize to you here.
Today, let's look at a
Method One: Use Dir () to traverse the directory
Dir () function, returning a directory class instance when successful
The PHP dir () syntax format is:
Dir (directory)//directory the name of the directory where the file name needs to be displayed,
Python __dict__ with Dir ()
Python __dict__ and Dir
__dict__ Property
Dir function
Conclusion
Reprint please indicate the source (http://blog.csdn.net/lis_12/article/details/53521554).Python has all the
You can use the built-in Dir () function to list an identifier for a defined object. For example, for a module, include functions, classes, and variables defined in the module.When you provide a module name to Dir (), it returns a list of the names
In Win7, you cannot view the file list using the dir or ls commands of ftp. In this case, you cannot view the file list using the dir or ls commands of ftp in command line mode of Win7, you cannot view the file list using the dir or ls commands of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.