Re: [Tutor] data structures general query

2019-06-26 Thread Cameron Simpson
On 26Jun2019 11:01, Mats Wichmann wrote: On 6/26/19 4:40 AM, mhysnm1...@gmail.com wrote: Link lists I would guess be useful in an index for a database? I believe the "classic" use case is memory management - keeping track of chunks of memory. Flipping this, your typical ordered database ind

Re: [Tutor] data structures general query

2019-06-26 Thread Alan Gauld via Tutor
On 26/06/2019 19:46, Mats Wichmann wrote: > I forgot to add the snide-comment part of "what are these good for": > > (a) binary search trees are excellent for Computer Science professors > who want to introduce recursion into their classes. > > (b) all the classic data structures are candidates

Re: [Tutor] data structures general query

2019-06-26 Thread Mats Wichmann
On 6/26/19 11:59 AM, William Ray Wing via Tutor wrote: > One of the most useful (to me) structures is the double-ended queue ("from > collections import deque”). It creates a queue that can quickly remove an > item from one end and add an item to the other. Particularly useful for > displayin

Re: [Tutor] data structures general query

2019-06-26 Thread William Ray Wing via Tutor
> On Jun 26, 2019, at 6:40 AM, mhysnm1...@gmail.com wrote: > > All, > > > > General computer science question for data structures. > > When would you use the below structures and why? If you can provide a real > life example on when they would be used in a program This would be great. I > am

Re: [Tutor] data structures general query

2019-06-26 Thread Mats Wichmann
On 6/26/19 4:40 AM, mhysnm1...@gmail.com wrote: > All, > > > > General computer science question for data structures. > > When would you use the below structures and why? If you can provide a real > life example on when they would be used in a program This would be great. I > am not after cod

Re: [Tutor] data structures general query

2019-06-26 Thread Alan Gauld via Tutor
On 26/06/2019 11:40, mhysnm1...@gmail.com wrote: > When would you use the below structures and why? If you can provide a real > life example on when they would be used in a program This would be great. > Link lists Link lists are very flexible and ideal for when you have a varying amount of dat

[Tutor] data structures general query

2019-06-26 Thread mhysnm1964
All, General computer science question for data structures. When would you use the below structures and why? If you can provide a real life example on when they would be used in a program This would be great. I am not after code, just explanation. Link lists Double link-lists Binary tre

Re: [Tutor] Data Structures printing and Python Package creation

2018-02-03 Thread Alex Kleider
On 2018-02-03 11:20, Bob Gailer wrote: On Feb 3, 2018 2:09 PM, "Daniel Bosah" wrote: I'm in a research group for school, and my first task is to learn how to make a Python package and to learn how to print out all types of data structures. Are there resources I can be pointed to to help me o

Re: [Tutor] Data Structures printing and Python Package creation

2018-02-03 Thread Bob Gailer
On Feb 3, 2018 2:09 PM, "Daniel Bosah" wrote: > > I'm in a research group for school, and my first task is to learn how to > make a Python package and to learn how to print out all types of data > structures. Are there resources I can be pointed to to help me out. https://python-packaging.readthe

[Tutor] Data Structures printing and Python Package creation

2018-02-03 Thread Daniel Bosah
I'm in a research group for school, and my first task is to learn how to make a Python package and to learn how to print out all types of data structures. Are there resources I can be pointed to to help me out. Thanks ___ Tutor maillist - Tutor@python.

Re: [Tutor] data structures

2010-12-02 Thread Steven D'Aprano
Knacktus wrote: Am 02.12.2010 02:51, schrieb Dana: Hello, I'm using Python to extract words from plain text files. I have a list of words. Now I would like to convert that list to a dictionary of features where the key is the word and the value the number of occurrences in a group of files base

Re: [Tutor] data structures

2010-12-02 Thread Alan Gauld
"Dana" wrote I'm using Python to extract words from plain text files. I have a list of words. Now I would like to convert that list to a dictionary of features where the key is the word and the value the number of occurrences in a group of files based on the filename I think I know what

Re: [Tutor] data structures

2010-12-01 Thread Knacktus
Am 02.12.2010 02:51, schrieb Dana: Hello, I'm using Python to extract words from plain text files. I have a list of words. Now I would like to convert that list to a dictionary of features where the key is the word and the value the number of occurrences in a group of files based on the filename

Re: [Tutor] data structures

2010-12-01 Thread Chris Fuller
It sounds to me like all you need is for the values to be another dictionary, keyed on filename? Don't use globals if you can help it. You should be able to structure your program such that they aren't necessary. Something like this? features = { feature1': {'file1': 12, 'file2': 0, 'fil

[Tutor] data structures

2010-12-01 Thread Dana
Hello, I'm using Python to extract words from plain text files. I have a list of words. Now I would like to convert that list to a dictionary of features where the key is the word and the value the number of occurrences in a group of files based on the filename (different files correspond t

[Tutor] data structures and algorithms with object-oriented design patterns in python

2007-07-29 Thread bhaaluu
Greetings, While searching for information about Python Data Structures I came across this site and thought it might be interesting for others on the list as well: http://www.brpreiss.com/books/opus7/ Data Structures and Algorithms with Object-Oriented Design Patterns in Python. Bruno Preiss. Co