How to run python function after completed other function : my purpose is, when I run "list.py" first step, script will read a target_list.txt and it  will create a domain list as "http://testsites.com". 
if this process when completed, it means finish the target_list, other function must run. Here's code
example:

    import Queue
    
    #!/usr/bin/python
    
    import Queue
    
    targetsite="target_list.txt"
    def domaincreate(targetsitelist):
     for i in targetsite.readlines():
      i = i.strip()
      Url="http://"+i
      DomainList=open("LiveSite.txt","rb")
      DomainList.write(Url)
      DomainList.close()

    def SiteBrowser():
	  TargetSite="LiveSite.txt"

	  Tar=open(TargetSite,"rb")
	  for Links in Tar.readlines():
		Links=Links.strip()
		UrlSites="http://www."+Links
	    browser = webdriver.Firefox()
		browser.get(UrlSites)
		browser.save_screenshot(Links+".png")
		browser.quit()
    domaincreate(targetsite)
    SiteBrowser()

