python basic show and return values
Question: I'm using python to input data to my script

then trying to return it back on demand to show the results

I tried to write it as simple as possible since it's only practicing and
trying to get the hang of python

here's how my script looks like

    
    
    #!/usr/python
    
    ## imports   #####
    ##################
    import os
    import sys
    
    ## functions
    ##################
    
    # GET INSERT DATA
    def getdata():
        clientname      = raw_input("   *** Enter Client Name > ")
        phone           = raw_input("   *** Enter Client Phone > ")
        location        = raw_input("   *** Enter Client Location > ")
        email           = raw_input("   *** Enter Client email > ")
        website         = raw_input("   *** Enter Client Website > ")
        return clientname, phone, location, email, website
    
    # VIEW DATA
    def showdata():
    
        print "==================="
        print ""
        print clientname
        print ""
        print phone
        print ""
        print location
        print ""
        print email
        print ""
        print website
        print ""
        print "==================="
    
    # CLEAR
    def clear():
        os.system("clear") #linux
        os.system("cls")   #windows
    
    # SHOW INSTRUCTIONS
    def welcome():
        clear()
        while True:
            choice          = raw_input(" Select Option > ")
            # INSERT DATA
            if choice == "1":
                getdata()
    
    
            # VIEW DATA
            elif choice == "2":
                showdata()
    
            else:
                print "Invalid Selection.. "
                print "Terminating... "
                #exit()
    welcome()
    

what am i doing wrong ? what am i missing?


Answer: You're absolutely misusing globals. Please go back and read a good Python
tutorial, for example from python.org.

Python is a programming language that allows you to define _functions_ , i.e.
things that _return_ values. You should definitely use that, instead of
`global`izing your input. I don't know where you've learned that – every
Python ressource that I'd know of will first introduce how to deal properly
with functions and their return values before even _mentioning_ `global`.

