python snippet
Creating pr function instead of print
yoo = 7def names(thing): return [name for name,ref in globals().items() if ref is thing][0] # print(names(yoo)) def pr(varname): print(names(varname)+": ",varname) pr(yoo)
Comments
Post a Comment