Answers for "python get current line unmber"

0

python how to get current line number

#python3
from inspect import currentframe, getframeinfo

frameinfo = getframeinfo(currentframe())

print(frameinfo.filename, frameinfo.lineno)
Posted by: Guest on January-18-2021

Python Answers by Framework

Browse Popular Code Answers by Language