mirror of
https://github.com/DavidGailleton/42-Piscine_Python.git
synced 2026-03-13 20:56:54 +01:00
15 lines
388 B
Python
15 lines
388 B
Python
import sys
|
|
|
|
if __name__ == "__main__":
|
|
args = sys.argv
|
|
if len(args) <= 1:
|
|
print("No arguments provided !")
|
|
print("Program name: " + args[0])
|
|
if len(args) > 1:
|
|
print("Arguments received:", len(args) - 1)
|
|
i = 1
|
|
while i < len(args):
|
|
print("Argument", i, ":", args[i])
|
|
i = i + 1
|
|
print("Total arguments:", len(args))
|