목록Python (1)
프로그래머 메로니
IPython tip
Ipython Tip Table of Contents Ipython Tip1. 자기관찰(인트로스펙션[Introspection])2. %run 명령어3. %prun과 %run -p를 이용한 시간 측정 1. 자기관찰(인트로스펙션[Introspection]) 변수 이름 앞이나 뒤에 ?를 붙이면 그 객체에 대한 일반 정보를 출력 In [13]: a = [1,2,3] In [14]: a? Type: list String form: [1, 2, 3] Length: 3 Docstring: list() -> new empty list list(iterable) -> new list initialized from iterable's items 이외에도 함수에 대한 정보도 출력가능 ?를 함수명과 사용하면 함수의 주석이 출..
Python
2017. 8. 19. 19:56