Re: [Tutor] Follow-up on my removing elements from lists question.

2019-06-15 Thread David L Neil
On 15/06/19 9:35 PM, mhysnm1...@gmail.com wrote: This is a follow-up on my previous question for removing elements. Below is the code I am currently using. I am removing the elements at the end of the outer loop. The data structure goes along this: [ ['123123',[2019-2-18', 'transaction text',

Re: [Tutor] Follow-up on my removing elements from lists question.

2019-06-15 Thread Mats Wichmann
On 6/15/19 3:35 AM, mhysnm1...@gmail.com wrote: Data structure: ['123123',[2019-2-18', 'transaction text', 'amount'], I presume the second opening brace is a typo and was supposed to be a quote mark? > The 2nd column where the transaction text I am modifying the content and > using the end re

Re: [Tutor] Follow-up on my removing elements from lists question.

2019-06-15 Thread Alex Kleider
On 2019-06-15 02:35, mhysnm1...@gmail.com wrote: This is a follow-up on my previous question for removing elements. Below is the code I am currently using. I am removing the elements at the end of the outer loop. The data structure goes along this: [ ['123123',[2019-2-18', 'transaction te

[Tutor] Follow-up on my removing elements from lists question.

2019-06-15 Thread mhysnm1964
This is a follow-up on my previous question for removing elements. Below is the code I am currently using. I am removing the elements at the end of the outer loop. The data structure goes along this: [ ['123123',[2019-2-18', 'transaction text', 'amount'], v ['123123',[2019-2-18', 'transac

Re: [Tutor] Follow Up

2007-02-18 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > I thought that I would be able to treat this like one of the standard > libraries (ie random) where I just include the random lib and then use a command such as random.randrange(x,y). Will this not work with a custom class? Yes you can do that with a custom class or wit

Re: [Tutor] Follow-up Qs: Re: Identity operator (basic types)

2007-02-11 Thread Alan Gauld
"Cecilia Alm" <[EMAIL PROTECTED]> wrote > When we copy any such data type (float, integer, string, char, bool) > into a > function definition's local scope, does it always copy-by-value > then? Kent has already answered this but no. we never copy by value in Python, we create a new reference to

Re: [Tutor] Follow-up Qs: Re: Identity operator (basic types)

2007-02-11 Thread Kent Johnson
Cecilia Alm wrote: > Thanks for the respones. A few follow-up questions: > > For these basic types (float, integer, string, char, bool) does python > always figure out the identity change when assigning a 'new value', > as it seems to do below? > > >>> i = "hi" > >>> j = i > >>> print i, j, i

[Tutor] Follow-up Qs: Re: Identity operator (basic types)

2007-02-11 Thread Cecilia Alm
Thanks for the respones. A few follow-up questions: For these basic types (float, integer, string, char, bool) does python always figure out the identity change when assigning a 'new value', as it seems to do below? i = "hi" j = i print i, j, id(i), id(j) hi hi 12235136 12235136 j += i print