#!/usr/bin/python3
###################################################################################
# Pass firstname and lastname on the command line
# This script will not work directly on the web
###################################################################################
print("Content-Type: text/html \n")     #http header with newline char (required for web)
import sys                              #sys module to accept arguments

if len(sys.argv) < 2:                   #name of this script is always provided as argv[0]
    print("Please provide your name as argument on command line")
    exit()

if len(sys.argv) < 3:                   #if only first name is provided
    sys.argv.append("")                 #create a last name as empty

firstname = sys.argv[1]
lastname  = sys.argv[2]

print("Hello", firstname , lastname)