0

is there any easy way to print current line number of running python file?

a = 1
print(__line__)
b = 2
c = a+b
print(__line__)

Desired output:

2
5
Chris P
  • 2,059
  • 4
  • 34
  • 68

0 Answers0