Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 174 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Python 3 Python, 17 bytes

'\.count\''.count

An unnamed function that accepts a character and returns 1 (truthy) if present in its source code or 0 (falsey) if not.

Try it online! (Python 3) Or Try in Python 2 Or Try in Python 1 .

Python 3, 17 bytes

'\.count\''.count

An unnamed function that accepts a character and returns 1 (truthy) if present in its source code or 0 (falsey) if not.

Try it online!

Python, 17 bytes

'\.count\''.count

An unnamed function that accepts a character and returns 1 (truthy) if present in its source code or 0 (falsey) if not.

Try it online! (Python 3) Or Try in Python 2 Or Try in Python 1 .

Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Python 3, 17 bytes

'\.count\''.count

An unnamed function that accepts a character and returns 1 (truthy) if present in its source code or 0 (falsey) if not.

Try it online!

AltStyle によって変換されたページ (->オリジナル) /