參考網址:http://linux.byexamples.com/archives/342/python-how-to-identify-the-type-of-your-variable/
下面這個不能放在print後面
type(var)

所以要用下面這個,就可以在run time時印出變數的type
print var.__class__

song1st 發表在 痞客邦 留言(0) 人氣()