1
0
mirror of https://github.com/satwikkansal/wtfpython synced 2024-11-23 11:34:24 +01:00
wtfpython/snippets/2_tricky_strings.py
Vadim Nifadev f25156107b Configure Nox and basic Poetry support
- Use new structure for code blocks in README
2024-10-24 07:53:10 +03:00

20 lines
261 B
Python

# 1
assert id("some_string") == id("some" + "_" + "string")
assert id("some_string") == id("some_string")
# 2
a = "wtf"
b = "wtf"
assert a is b
a = "wtf!"
b = "wtf!"
assert a is b
# 3
a, b = "wtf!", "wtf!"
assert a is b
a = "wtf!"; b = "wtf!"
assert a is b