Search found 170 matches

Re: How to program in Python + Paste Code for review/help

I guess what you are looking for is a debug print function?! My short research has shown that this might be not an easy problem also regarding safety of the code, but for now this might work: def dbprint(x): print 'Variable', x, 'has a value of', repr(eval(x)) Then you should use it like a = 1 dbpri...

Re: How to program in Python + Paste Code for review/help

What version of Python are you using? It seems that you are mixing 3.x and 2.x syntax for print statements. In Python 3.x you have to use the brackets, so i am going to guess that you are using 2.7. I have basically no experience with 2.x as it is outdated and no longer useful to learn over 3.x, but...

Go to advanced search

cron