Python之打印变量 def myprint(v): print v print type(v) try: print v.shape except: try: print len(v) except: pass