Q: "...Learning with Python" ...a property that addition and multiplication have...
Paul Rubin
http
Thu May 26 15:40:24 EDT 2005
jeffbernstein at yahoo.com 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. "a"+"b" is not the same
as "b"+"a".
More information about the Python-list
mailing list