what does ` ` do in ' '.join([`x * x` for x in range(1, 6)])?

alex23 wuwei23 at gmail.com
Sat Sep 27 13:53:56 CEST 2008


On Sep 27, 3:58 pm, r0g <aioe.... at technicalbloke.com> wrote:
> Ah, just spotted the backticks - they just return whatever's inside them
> as a string.

No, they return the repr() of the object inside. The output of
__repr__ -has- to be a string, but typecasting into string isn't the
intention of repr() (or the ` operator).



More information about the Python-list mailing list