Skip to main content
added 174 characters in body
Source Link
Jonathan Allan
  • 115.9k
  • 8
  • 69
  • 294

Python 3Python, 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.9k
  • 8
  • 69
  • 294

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!