Are strings singletons in Python

Posted by Nikolay Vyahhi on Stack Overflow See other posts from Stack Overflow or by Nikolay Vyahhi
Published on 2010-03-25T21:33:32Z Indexed on 2010/03/25 21:43 UTC
Read the original article Hit count: 403

Filed under:
|
|
|

Does Python have a pool of all strings and are they (strings) singletons there?

More precise, in the following code one or two strings were created in memory:

a = str(num)
b = str(num) 

?

© Stack Overflow or respective owner

Related posts about python

Related posts about string