Re: [Tutor] Bundle help!

2007-07-16 Thread Jason Massey
A nice tutorial on using regular expressions in Python: http://www.amk.ca/python/howto/regex/ On 7/15/07, bhaaluu <[EMAIL PROTECTED]> wrote: Hi! http://docs.python.org/lib/module-re.html Regular Expressions module. On 7/15/07, Sara Johnson <[EMAIL PROTECTED]> wrote: >

Re: [Tutor] Bundle help!

2007-07-15 Thread bhaaluu
Hi! http://docs.python.org/lib/module-re.html Regular Expressions module. On 7/15/07, Sara Johnson <[EMAIL PROTECTED]> wrote: > > > Just curious, but in this link (' > http://xahlee.org/perl-python/sort_list.html ') you > mentioned, what does the "re" part mean? At firs

Re: [Tutor] Bundle help!

2007-07-15 Thread Sara Johnson
Regarding my early question on bundle. Not sure if this makes any sense, but I noticed where else it's used. If this looks funny, remember that I did not write it (and therefore do not entirely understand it). I'm only editing it according to some specific guidelines. >>>for key in h.ke

Re: [Tutor] Bundle help!

2007-07-15 Thread Sara Johnson
Thanks to everyone for your help and quick responses! Has anyone heard of the "bundle method?" Some of you have already said you didn't. I wonder why it's included as part of my code/instructions. I'm trying to accomplish what I 'think' they want with the other questions I've posed here

Re: [Tutor] Bundle help!

2007-07-11 Thread Alan Gauld
"Sara Johnson" <[EMAIL PROTECTED]> wrote > but I don't suppose there are any design documents available? > Structure charts, class diagrams? Even plain text or pseudo > code? > > Not sure I follow what you mean by those specific documents > or diagrams, I guess that answers the question!

Re: [Tutor] Bundle help!

2007-07-10 Thread Sara Johnson
Alan Gauld <[EMAIL PROTECTED]> wrote:"Sara Johnson" wrote > this is sort of a script that was written and I'm making > modifications to. Due to my serious lack of experience, > I'm afraid to rewrite anything. This is probably a long shot given the code you've posted so far, but I don't

Re: [Tutor] Bundle help!

2007-07-09 Thread Bill Burns
[Sara Johnson] > Sorry to be so confusing. Just realized a dumb mistake I made. It > doesn't need to be resorted alphabetically and numerically. I need one > list alphabetical and one numerical. > > > (Alphabetical) List 1, [('Fred', 20), ('Joe', 90), ('Kent', 50), > ('Sara', 80)] > >

Re: [Tutor] Bundle help!

2007-07-09 Thread Alan Gauld
"Sara Johnson" <[EMAIL PROTECTED]> wrote > this is sort of a script that was written and I'm making > modifications to. Due to my serious lack of experience, > I'm afraid to rewrite anything. This is probably a long shot given the code you've posted so far, but I don't suppose there are an

Re: [Tutor] Bundle help!

2007-07-09 Thread Sara Johnson
Sorry, just needing to clarify. As I may have eluded to in other posts, this is sort of a script that was written and I'm making modifications to. Due to my serious lack of experience, I'm afraid to rewrite anything. However, would I accomplish the same result by copying the lists, then break

Re: [Tutor] Bundle help!

2007-07-09 Thread David Perlman
Maybe this reference will help: http://xahlee.org/perl-python/sort_list.html Just the first part of the discussion there. On Jul 9, 2007, at 9:54 AM, Sara Johnson wrote: > Sorry to be so confusing. Just realized a dumb mistake I made. It > doesn't need to be resorted alphabetically and numeri

Re: [Tutor] Bundle help!

2007-07-09 Thread Sara Johnson
Sorry to be so confusing. Just realized a dumb mistake I made. It doesn't need to be resorted alphabetically and numerically. I need one list alphabetical and one numerical. (Alphabetical) List 1, [('Fred', 20), ('Joe', 90), ('Kent', 50), ('Sara', 80)] (Numerical) List 2, [('

Re: [Tutor] Bundle help!

2007-07-09 Thread David Perlman
I think what you want to do is start from the beginning with two separate lists, sort each one however you want, and then either join them with zip() or simply reference them as (list1[n], list2[n]). I believe there's also a way to use zip() to separate your list of tuples into separate list

Re: [Tutor] Bundle help!

2007-07-09 Thread Alan Gauld
"Sara Johnson" <[EMAIL PROTECTED]> wrote >>Use append() to add more data, then sort again to get it in order: In [6]: data.append(('Joe', 90)) In [7]: data.sort() In [8]: data Out[8]: [('Fred', 20), ('Joe', 90), ('Kent', 50), ('Sara', 80)] > > What happens if I need to sort alphab

Re: [Tutor] Bundle help!

2007-07-08 Thread Sara Johnson
I brought this up with Kent a little while ago... >>>If you have a list of pairs of (name, percentage) then you should be >>>able to sort it directly with the sort() method of the list. For >>>example: >>>In [3]: data = [ ('Kent', 50), ('Sara', 80), ('Fred', 20) ] >>>In [4]: data.sort() >>

Re: [Tutor] Bundle help!

2007-06-26 Thread Kent Johnson
Sara Johnson wrote: > Hi Kent, > > I had a list to sort alphabetically (that included names and > percentages), then I had to apend that list to sort by the category > represented by the percentages. I've tried to use something like: > > mylist = [whatever...] > mylist.append(whatever) and t

Re: [Tutor] Bundle help!

2007-06-25 Thread Reed O'Brien
On Jun 25, 2007, at 9:56 PM, Sara Johnson wrote: I'm to use the bundle method to append some information to a list. I have no idea how to do that! I have Python for Dummies and I think I need Python for Complete Idiots because I am not seeing how to do this!! I have basic C+ knowledge a

Re: [Tutor] Bundle help!

2007-06-25 Thread Kent Johnson
Sara Johnson wrote: > I'm to use the bundle method to append some information to a list. I > have no idea how to do that! What is the bundle method? What have you tried so far? What are you trying to accomplish? Kent ___ Tutor maillist - Tutor@pyth