"Sullivan WxPyQtKinter" wrote: > Guess what would be the result of these functions: > > >>>str.lower('ASFA') > >>>str.join(str(),['1','1','1']) > >>>str.join('a','b') > > If you guess them correctly, please explain.
as I just said, I.method() and C.method(I) are equivalent, so that's just an odd way to write 'ASFA'.lower() str().join(['1', '1', '1']) 'a'.join('b') which, given that str() returns an empty string, and a string behaves like a sequence of individual characters, is equivalent to 'ASFA'.lower() => 'asfa' ''.join(['1', '1', '1']) => '111' 'a'.join(['b']) => 'b' </F> -- http://mail.python.org/mailman/listinfo/python-list