Re: [Tutor] Unexpected results using enumerate() and .split()

2015-03-31 Thread Mark Lawrence
On 31/03/2015 21:49, boB Stepp wrote: On Tue, Mar 31, 2015 at 3:42 PM, Zachary Ware wrote: Also, not that since you aren't using the index for anything, you don't need to use enumerate() to iterate over the list. Just do "for item in L:". Of course, if you actually use the index in the real

Re: [Tutor] Unexpected results using enumerate() and .split()

2015-03-31 Thread boB Stepp
On Tue, Mar 31, 2015 at 3:42 PM, Zachary Ware wrote: > Also, not that since you aren't using the index for anything, you > don't need to use enumerate() to iterate over the list. Just do "for > item in L:". Of course, if you actually use the index in the real > code that I assume this was cut o

Re: [Tutor] Unexpected results using enumerate() and .split()

2015-03-31 Thread boB Stepp
On Tue, Mar 31, 2015 at 3:32 PM, Dave Angel wrote: > On 03/31/2015 04:23 PM, boB Stepp wrote: >> >> The following behavior has me stumped: >> >> Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit >> (Intel)] on win32 >> Type "copyright", "credits" or "license()" for more information.

Re: [Tutor] Unexpected results using enumerate() and .split()

2015-03-31 Thread Zachary Ware
On Tue, Mar 31, 2015 at 3:37 PM, boB Stepp wrote: > On Tue, Mar 31, 2015 at 3:28 PM, Zachary Ware > wrote: >> On Tue, Mar 31, 2015 at 3:23 PM, boB Stepp wrote: >>> The following behavior has me stumped: >>> >>> Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit >>> (Intel)] on win3

Re: [Tutor] Unexpected results using enumerate() and .split()

2015-03-31 Thread boB Stepp
On Tue, Mar 31, 2015 at 3:28 PM, Zachary Ware wrote: > On Tue, Mar 31, 2015 at 3:23 PM, boB Stepp wrote: >> The following behavior has me stumped: >> >> Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit >> (Intel)] on win32 >> Type "copyright", "credits" or "license()" for more inf

Re: [Tutor] Unexpected results using enumerate() and .split()

2015-03-31 Thread Dave Angel
On 03/31/2015 04:23 PM, boB Stepp wrote: The following behavior has me stumped: Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. L = ['#ROI:roi_0', '#TXT:text_0', '#1:one^two^three'] for i, item i

Re: [Tutor] Unexpected results using enumerate() and .split()

2015-03-31 Thread Zachary Ware
On Tue, Mar 31, 2015 at 3:23 PM, boB Stepp wrote: > The following behavior has me stumped: > > Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit > (Intel)] on win32 > Type "copyright", "credits" or "license()" for more information. L = ['#ROI:roi_0', '#TXT:text_0', '#1:one^two^

[Tutor] Unexpected results using enumerate() and .split()

2015-03-31 Thread boB Stepp
The following behavior has me stumped: Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> L = ['#ROI:roi_0', '#TXT:text_0', '#1:one^two^three'] >>> for i, item in enumerate(L): subitems = i