Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Yehuda Levental yehudalev

🏠
Working from home
View GitHub Profile
View nl.py
import sys
args = len(sys.argv)
if args == 1:
print("Enter a file name below")
f = sys.stdin.readline().rstrip()
elif args == 2:
f = sys.argv[1]
else:
sys.exit("please enter the command this way: 'python nl.py [a file]'")