Advertisement
teslariu

args

Jul 31st, 2021
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. import sys
  5.  
  6. nombres = sys.argv[1:]
  7. if nombres:
  8.     for nombre in nombres:
  9.         print(f"Hola {nombre}")
  10. else:
  11.     print("No me has dicho ningún nombre")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement