-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2_anatomy.py
34 lines (28 loc) · 825 Bytes
/
2_anatomy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/python
# Example Python script
# another comment
# CTRL + /
import sys
# argv is part of the sys module
# argument vector a.k.a the list of parameters or inputs to the program
# argument_count is our variable that stores the number of inputs to the program
# print(len("toria"))
argument_count = len(sys.argv)
print(argument_count)
# 'if' is called a condition expression
if argument_count > 1:
print('Too many args')
print('Please try again')
else:
# where is a variable whose value is a string 'World'
where = 'World'
print("Hello", where)
print('Goodbye from ' + sys.argv[0])
print('Goodbye from ', sys.argv[0])
print('one', 'two', 'three', sep="!!!", end="!\n\n\n")
print('four')
# print(sys.argv[1])
# print(sys.argv[2])
# print(sys.argv[3])
# print(sys.argv[4])
# print(sys.argv[1])