ADRIAN KELLY wrote:
Please can anyone tell me how i can print this without all the brackets and commas, i know i need the modulus symbol but i dont know how it works. any advice would be appreciated regards
adrian
def arguments():
    name=raw_input ("Please enter your firstname: ")
    surname=raw_input ("Enter your surname: ")
    address1=raw_input ("Enter Address line 1: ")
    address2=raw_input ("Enter Address line 2: ")
    address3=raw_input ("Enter Address line 3: ")
    return name,surname,address1,address2,address3

address=arguments()

This line is misleading. arguments() does not return an address. It returns a name, a surname, and three address lines.

print "%s %s" % address

Try one of these instead:

# Version 1
name,surname,address1,address2,address3 = arguments()
print name
print surname
print address1
print address2
print address3


# Version 2
items = arguments()
for item in items:
    print item

# Version 3
items = arguments()
print "%s %s %s %s %s" % items



--
Steven

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to