普罗米修斯
参照 PHP 的 print_r 函数构造了一个 Python 版本的 print_r,起名叫 iPypr,方法为 pypr。
12345
作者 : casstiel邮箱 : emo_ooppwwqq0@163.comQQ : 443557165BLOG : http://c.isme.pub/GITHUB : https://github.com/ooppwwqq0/iPypr
1
pip install iPypr
from iPypr import pypra=[1,"2",3,3.1415,"asda",True,(1,2,4,5,[1,2,{"a":"a","b":True,"c":1,"d":[2,3,4]}]),[2,4,6,7,"123"],{"a":"asdas","b":123}]pypr(a)
输出
123456789101112131415161718192021222324252627282930313233343536373839
List(9) [ [0] => 1 [1] => "2" [2] => 3 [3] => 3.1415 [4] => "asda" [0] => True [6] => Tuple(5) ( [0] => 1 [1] => 2 [2] => 4 [3] => 5 [4] => List(3) [ [0] => 1 [1] => 2 [2] => Dict(4) { [a] => "a" [b] => True [c] => 1 [d] => List(3) [ [0] => 2 [1] => 3 [2] => 4 ] } ] ) [7] => List(5) [ [0] => 2 [1] => 4 [2] => 6 [3] => 7 [4] => "123" ] [8] => Dict(2) { [a] => "asdas" [b] => 123 }]