I'm looking for a little help. I'm trying to create a script with the ability to take home page as an argument, printing a message to say something about the site and then validate whether or not this is a valid URL. I'm relatively new to Python and haven't used arguments very much and would like some help/advice.
I have some basic code which I've completed but I'm unsure of how to expand on it. If someone could help or point me in the direction of where I would find information about arguments and using with with URLs that would be great.
import sys def printWebsite(URL): URL = raw_input ("Enter website to be checked") site = raw_input print "Valid URL" def main(): print "Website " printWebsite(sys.argv) if __name__ == '__main__': main()
Any advice would be greatly appreciated.