P
process
' '.join([`x * x` for x in range(1, 6)])
exactly what does this symbol do and what does it stand for?
exactly what does this symbol do and what does it stand for?
' '.join([`x * x` for x in range(1, 6)])
exactly what does this symbol do and what does it stand for?
process said:' '.join([`x * x` for x in range(1, 6)])
exactly what does this symbol do and what does it stand for?
process said:' '.join([`x * x` for x in range(1, 6)])
exactly what does this symbol do and what does it stand for?
Ah, just spotted the backticks - they just return whatever's inside them
as a string.
alex23 said:' '.join((str(x * x) for x in range(1,6)))
I'd classify it as one of Guido's mistakes!process said:' '.join([`x * x` for x in range(1, 6)])exactly what does this symbol do and what does it stand for?
It's an obsolete, deprecated syntactic sugar for (what is now
implemented as) the built-in 'repr' function.
Instead, write the above as:
' '.join([repr(x * x) for x in range(1, 6)])
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.