Re: [Tutor] Rearranging a list of numbers with corresponding index (RESOLVED)

2015-03-13 Thread Matthew Ruffalo
On 03/13/2015 11:55 AM, Ken G. wrote: I will be studying this also. I am still using Python 2.7.6 as that is the latest as provided by Ubuntu 14.04.1. FYI, Python 3.4 is installed by default in Ubuntu 14.04(.1). You have to invoke it as 'python3' though. MMR...

Re: [Tutor] Rearranging a list of numbers with corresponding index

2015-03-13 Thread Dave Angel
On 03/13/2015 09:57 AM, Ken G. wrote: I have been keeping track of numbers drawn in our local lotto drawings into a list format as shown in a short example below. Using such list, I am able to determine how often a number appears within the last 100 plus drawings. The length of my lists range

Re: [Tutor] Rearranging a list of numbers with corresponding index

2015-03-13 Thread Ken G.
On 03/13/2015 10:21 AM, Peter Otten wrote: Ken G. wrote: I have been keeping track of numbers drawn in our local lotto drawings into a list format as shown in a short example below. Using such list, I am able to determine how often a number appears within the last 100 plus drawings. The

[Tutor] Rearranging a list of numbers with corresponding index

2015-03-13 Thread Ken G.
I have been keeping track of numbers drawn in our local lotto drawings into a list format as shown in a short example below. Using such list, I am able to determine how often a number appears within the last 100 plus drawings. The length of my lists range from 5, 15, 35, 59and 75 long. I will

Re: [Tutor] Rearranging a list of numbers with corresponding index

2015-03-13 Thread Peter Otten
Ken G. wrote: I have been keeping track of numbers drawn in our local lotto drawings into a list format as shown in a short example below. Using such list, I am able to determine how often a number appears within the last 100 plus drawings. The length of my lists range from 5, 15, 35,

Re: [Tutor] Rearranging a list of numbers with corresponding index (RESOLVED)

2015-03-13 Thread Ken G.
On 03/13/2015 10:38 AM, Dave Angel wrote: On 03/13/2015 09:57 AM, Ken G. wrote: I have been keeping track of numbers drawn in our local lotto drawings into a list format as shown in a short example below. Using such list, I am able to determine how often a number appears within the last 100

Re: [Tutor] Rearranging a list

2015-02-26 Thread Ken G.
I may have mis-stated my intention. I will rewrite my request for assistance later and resubmit. Thanks, Ken On 02/26/2015 08:04 AM, Peter Otten wrote: Steven D'Aprano wrote: Ah wait, the penny drops! Now I understand what you mean! Glad I'm not the only one ;)

Re: [Tutor] Rearranging a list

2015-02-26 Thread Peter Otten
Steven D'Aprano wrote: Ah wait, the penny drops! Now I understand what you mean! Glad I'm not the only one ;) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Rearranging a list

2015-02-26 Thread Peter Otten
Ken G. wrote: Assuming I have the following list and code how do I best be able rearrange the list as stated below: list = [0, 0, 21, 35, 19, 42] Using print list[2:6] resulted in the following: 221 335 419 542 I would like to rearrange the list as follow: 5

Re: [Tutor] Rearranging a list

2015-02-26 Thread Steven D'Aprano
Ah wait, the penny drops! Now I understand what you mean! On Thu, Feb 26, 2015 at 07:13:57AM -0500, Ken G. wrote: In another words, I would desire to show that: 5 appears 42 times 3 appears 35 times 2 appears 21 times 4 appears 19 times but then I lose my original index of the numbers

Re: [Tutor] Rearranging a list

2015-02-26 Thread Peter Otten
Peter Otten wrote: Ken G. wrote: Assuming I have the following list and code how do I best be able rearrange the list as stated below: list = [0, 0, 21, 35, 19, 42] Using print list[2:6] resulted in the following: 221 335 419 542 I would like to rearrange the

Re: [Tutor] Rearranging a list

2015-02-26 Thread Mark Lawrence
On 26/02/2015 16:33, Ken G. wrote: I may have mis-stated my intention. I will rewrite my request for assistance later and resubmit. Thanks, Ken When you come back please don't top post, it makes following long threads difficult if not impossible, thanks. -- My fellow Pythonistas, ask not

[Tutor] Rearranging a list

2015-02-26 Thread Ken G.
Assuming I have the following list and code how do I best be able rearrange the list as stated below: list = [0, 0, 21, 35, 19, 42] Using print list[2:6] resulted in the following: 221 335 419 542 I would like to rearrange the list as follow: 542 335 221 419