Re: Q: ...Learning with Python ...a property that addition and multiplication have...

2005-05-26 Thread Paul Rubin
[EMAIL PROTECTED] writes: question is, Can you think of a property that addition and multiplication have that string concatenation and repetition do not? I thought it was the commutative property but string*3 is equivalent to 3*string. Any ideas? Um, string concatenation is not commutative.

Q: ...Learning with Python ...a property that addition and multiplication have...

2005-05-25 Thread jeffbernstein
Greetings. I'm reading How to think like a computer scientist: Learning with Python and there's a question regarding string operations. The question is, Can you think of a property that addition and multiplication have that string concatenation and repetition do not? I thought it was the

Re: Q: ...Learning with Python ...a property that addition and multiplication have...

2005-05-25 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: Greetings. I'm reading How to think like a computer scientist: Learning with Python and there's a question regarding string operations. The question is, Can you think of a property that addition and multiplication have that string concatenation and repetition do

Re: Q: ...Learning with Python ...a property that addition and multiplication have...

2005-05-25 Thread Greg Ewing
[EMAIL PROTECTED] wrote: Can you think of a property that addition and multiplication have that string concatenation and repetition do not? Existence of inverses? E.g. the additive inverse of 3 is -3, but there are no concatenative inverses of strings. (BTW, I would consider this more about

Re: Q: ...Learning with Python ...a property that addition and multiplication have...

2005-05-25 Thread Dan Sommers
On 25 May 2005 17:23:45 -0700, [EMAIL PROTECTED] wrote: I'm reading How to think like a computer scientist: Learning with Python and there's a question regarding string operations. The question is, Can you think of a property that addition and multiplication have that string concatenation and