Are strings cached?
>>> a = "zzzzqqqqasdfasdf1234" >>> b = "zzzzqqqqasdfasdf1234" >>> id(a) 4402117560 >>> id(b) 4402117560 but >>> c = "<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="113051">[email protected]</a>#$" >>> d = "<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="644524">[email protected]</a>#$" >>> id(c) == id(d) False >>> id(a) == id(b) True Why get same id() result only when assign string? Edited: I replace “ascii string” with just … Read more