Re: [Tutor] sample dictionairies

2015-04-20 Thread Ben Finney
Jim Mooney writes: > I should have known to simply try importing csv. Better: You should now know to refer to the documentation https://docs.python.org/3/library/>. -- \ “Speech is conveniently located midway between thought and | `\action, where it often substitutes for bo

Re: [Tutor] sample dictionairies

2015-04-20 Thread Laura Creighton
In a message of Sun, 19 Apr 2015 20:49:27 -0700, Jim Mooney writes: >Come to think of it, since I used | as a delimiter, what happens if you >generate a CSV file from data that already has commas in the text? > >-- >Jim In Sweden, and lots of other places, we do numbers differently. This is One

Re: [Tutor] sample dictionairies

2015-04-20 Thread Jim Mooney
> Which is why you should use the csv module to work with csv files, > it knows how to deal with these various exceptional cases. > -- > Alan G > I should have known to simply try importing csv. Must-remember-batteries-included ;') -- Jim ___ Tutor mai

Re: [Tutor] sample dictionairies

2015-04-20 Thread Mark Lawrence
On 20/04/2015 04:49, Jim Mooney wrote: For randomly generating data which look like addresses, I use: http://www.generatedata.com/ While it has 'export to programming language' as a feature, Python isn't one of the supported languages. Which is fine. It can export into comma separated values

Re: [Tutor] sample dictionairies

2015-04-20 Thread Alan Gauld
On 20/04/15 04:49, Jim Mooney wrote: Come to think of it, since I used | as a delimiter, what happens if you generate a CSV file from data that already has commas in the text? The CSV format covers that eventuality: You put quotes around the item with the comma. And if there are already quot

Re: [Tutor] sample dictionairies

2015-04-20 Thread Jim Mooney
For randomly generating data which look like addresses, I use: > http://www.generatedata.com/ > > While it has 'export to programming language' as a feature, Python isn't > one of the supported languages. Which is fine. It can export into comma > separated values, and writing a Python program to

Re: [Tutor] sample dictionairies

2015-04-19 Thread Laura Creighton
In a message of Sat, 18 Apr 2015 18:56:41 -0700, Jim Mooney writes: >Where could I download Python sample dictionaries on different subjects. >They're hard to type and I can only do small, limited ones to practice with. > >-- >Jim For randomly generating data which look like addresses, I use: htt

Re: [Tutor] sample dictionairies

2015-04-19 Thread Steven D'Aprano
On Sat, Apr 18, 2015 at 06:56:41PM -0700, Jim Mooney wrote: > Where could I download Python sample dictionaries on different subjects. > They're hard to type and I can only do small, limited ones to practice with. I don't think you can download Python dicts. It would be a bit hard, since Python

Re: [Tutor] sample dictionairies

2015-04-19 Thread Alan Gauld
On 19/04/15 02:56, Jim Mooney wrote: Where could I download Python sample dictionaries on different subjects. Like Ben I don't understand what you mean by subject. However,... They're hard to type and I can only do small, limited ones to practice with. If you just want a large dictionary gr

Re: [Tutor] sample dictionairies

2015-04-19 Thread Ben Finney
Jim Mooney writes: > Where could I download Python sample dictionaries on different > subjects. I don't know what yoy mean by the “subject” of a dictionary. A Python dict is a data structure. Its values can be any collection of Python objects. Is the “subject” of a dictionary its meaning? Its

[Tutor] sample dictionairies

2015-04-19 Thread Jim Mooney
Where could I download Python sample dictionaries on different subjects. They're hard to type and I can only do small, limited ones to practice with. -- Jim The probability of a piano falling on my head is 50%. After it falls on my head the probability is 100%. My confidence in the piano hitting