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 652 characters in body
Source Link
xnor
  • 149.6k
  • 26
  • 287
  • 676

Python 2, 56 bytes

lambda s:all(set(x)&set(s)for x in"e to for si".split())

Try it online!

Take inputs like two four, outputs negated. Checks whether the string has an e, and intersects the non-e numbers of two, four, and six.

52 bytes in Python 3 using {*x} for set(x).

Python 2, 56 bytes

lambda s:all(set(x)&set(s)for x in"e to for si".split())

Try it online!

Take inputs like two four, outputs negated. Checks whether the string has an e, and intersects the non-e numbers of two, four, and six.

Python 2, 56 bytes

lambda s:all(set(x)&set(s)for x in"e to for si".split())

Try it online!

Take inputs like two four, outputs negated. Checks whether the string has an e, and intersects the non-e numbers of two, four, and six.

52 bytes in Python 3 using {*x} for set(x).

Source Link
xnor
  • 149.6k
  • 26
  • 287
  • 676

Python 2, 56 bytes

lambda s:all(set(x)&set(s)for x in"e to for si".split())

Try it online!

Take inputs like two four, outputs negated. Checks whether the string has an e, and intersects the non-e numbers of two, four, and six.

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