Google Answers Logo
View Question
 
Q: Python - Input/Output ( No Answer,   0 Comments )
Question  
Subject: Python - Input/Output
Category: Computers > Algorithms
Asked by: macca1111-ga
List Price: $40.00
Posted: 16 Oct 2006 15:20 PDT
Expires: 19 Oct 2006 05:11 PDT
Question ID: 774166
Hi,

I have a file called list.txt and the file has the following data:

name,surname,1,1,1,1,1,1,1,p,w

I need to know how to import the data from the file and then assign
each of these to a variable.

For example:
name = []
surname = []
a=
b=
c=
d=
Each entry of data is a persons name and using a 1 for true and 0 for
false, I can manipulate the data after downloading.

At the moment, I'm not sure on how to use the string.split code to
separate the data components and then assign them to a variable.

Clarification of Question by macca1111-ga on 16 Oct 2006 19:00 PDT
The file is:

"name surname",1,1,1,1,1,1,1,p,w

and I need each of these to be separate variables

ie

names = [" "]
a=1
b=1
...
h=["p"]
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy