On 22/07/12 06:58, Santosh Kumar wrote:
prompt = raw_input("Can you tell me your name? ")
if prompt in ("Yes", "yes", "y", "Y"):
name = raw_input("What's your name? ")
elif prompt in ("No", "no", "n", "N"):
exit("OK, have nice day..")
else:
prompt = name
Don't you want
n
Only my second try to post to this list.
This is a dumb question with a simple (I presume) solution...
but...
how do I take a txt file with semicolon separated values and create a
dictionary and a list?
( in 2.6 because I'm working with ArcGIS.)
text file is as follows: (saved as text_data.txt) (i
On 22/07/2012 23:33, Gregory Lund wrote:
Only my second try to post to this list.
This is a dumb question with a simple (I presume) solution...
but...
how do I take a txt file with semicolon separated values and create a
dictionary and a list?
( in 2.6 because I'm working with ArcGIS.)
text file
Hi Greg,
Try this (next time try solving yourself first and post what you've
done and specific problems you're having trouble with.):
import csv
# read data using csv reader...
fileobj = open('text_data.txt')
csvreader = csv.reader(fileobj, delimiter=';')
csvreader.next() # skip header
# store