mardi 27 janvier 2015

How do I print a certain line of python code using the Linux terminal?


If I am writing some python and I only want the terminal to show a certain line, what command do I use? For example my program is: print("line one") print("line two") print("line three")


And I only want the code in line two to appear in the terminal - print("line two") - The command I'd use to run the whole program is python programname.py but how do I print a specific line?



Aucun commentaire:

Enregistrer un commentaire