In Python IDLE, what's the difference between 'print'ing a variable and just writing the variable?
问题 At the IDLE interpreter I do the following with dpkt: for ts, buf in pcap: eth = dpkt.ethernet.Ethernet(buf) Now, when I try to see the contents of 'eth' I can either print it, or just write the variable name. When I do: print eth I get: O&áÿE(r @,òÀ¨ DYP?Jò}PªpÉ However, when I simply write: eth I get the more expected output of: Ethernet(src='<removed>', dst='<removed>', data=IP(src='<removed>', off=16384, dst='<removed>', sum=11506, len=40, p=6, ttl=128, id=29344, data=TCP(seq=2527752393,