본문 바로가기
Python

dir

by SpeeDr00t 2016. 7. 21.
반응형

dir

1.소스

import math

print "dir() = %s\n\n " %  dir()

print "dir(math ) = %s" % dir(math )                                  

결과

hacker@ubuntu:~/python$ python dir1.py 
dir() = ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'math']

 
dir(math ) = ['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'hypot', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']
                           
반응형

'Python' 카테고리의 다른 글

as  (0) 2016.07.21
import ( from )  (0) 2016.07.21
random  (0) 2016.07.21
python for  (0) 2016.07.21
python while 문  (0) 2016.07.21