79284722

Date: 2024-12-16 12:50:50
Score: 0.5
Natty:
Report link

Probably not exactly what you're looking for, but here's a fun one that (ab)uses the maligned walrus operator:

>>> x = {"a": "a", "b": "b"}
>>> (x_without_a := dict(x)).pop("a")
'a'
>>> x
{'a': 'a', 'b': 'b'}
>>> x_without_a
{'b': 'b'}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: govind