檢查python 你用的到底是在哪裡,還有版本
import sys
print (sys.path) #印出python 使用的路徑 來確定版本
print("python ver.:" ,sys.version) #印出使用版本
印出所有build in function, 看看哪些可用
print (dir(__builtins__))
利用type() 查詢物件型別
ex: type(3)
<class 'int'>
印出object 內含的method
a=[1,2,3]
print (dir(a))
沒有留言:
張貼留言