Hi there. I am currently writing a registration program in Python, and have come across a problem. In my hours of searching, there seems to be no way to split a list that has elements obtained from raw_input. Basically, I would like to take input from a user, feed it into an array, and then split that array with commas so that it can be imported into Excel.
Here is what I have so far:
def main():
info = []
name1 = raw_input("What is your name? ")
info.append(name1)
org_name = raw_input("What organization do you work for? ")
info.append(org_name)
title = raw_input("What is your title at this organization? ")
info.append(title)
addr1 = raw_input("What is the address of your organization, all on one line? ")
info.append(addr1)
email1 = raw_input("What is your email address? ")
info.append(email1)
phone1 = raw_input("What is your phone number? ")
info.append(phone1)
print "We will be writing your information to a file."
print info
main()
I have already tried info.split(',')
and it simply gives me errors. Thanks in advance.