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 131 characters in body
Source Link
RGS
  • 14.2k
  • 1
  • 62
  • 117

Python 3,(削除) 28 (削除ここまで) 27 bytes

lambda e:"(|)D".find(e[-1])

Try it online!

Because we don't care about the eyes/nose, we can just look at the mouth (the last character) and find its index in a string with all the mouths, ordered from saddest to happiest :) Thanks @Surculose Sputum!

Python 3, 27 bytes

lambda e:"(|)D".find(e[-1])

Try it online!

Because we don't care about the eyes/nose, we can just look at the mouth (the last character) and find its index in a string with all the mouths, ordered from saddest to happiest :)

Python 3,(削除) 28 (削除ここまで) 27 bytes

lambda e:"(|)D".find(e[-1])

Try it online!

Because we don't care about the eyes/nose, we can just look at the mouth (the last character) and find its index in a string with all the mouths, ordered from saddest to happiest :) Thanks @Surculose Sputum!

added 131 characters in body
Source Link
RGS
  • 14.2k
  • 1
  • 62
  • 117

Python 3, 2827 bytes

lambda e:"(|)D".indexfind(e[-1])

Try it online! Try it online!

Because we don't care about the eyes/nose, we can just look at the mouth (the last character) and find its index in a string with all the mouths, ordered from saddest to happiest :)

Python 3, 28 bytes

lambda e:"(|)D".index(e[-1])

Try it online!

Because we don't care about the eyes/nose, we can just look at the mouth (the last character) and find its index in a string with all the mouths, ordered from saddest to happiest :)

Python 3, 27 bytes

lambda e:"(|)D".find(e[-1])

Try it online!

Because we don't care about the eyes/nose, we can just look at the mouth (the last character) and find its index in a string with all the mouths, ordered from saddest to happiest :)

added 185 characters in body
Source Link
RGS
  • 14.2k
  • 1
  • 62
  • 117

Python 3, 28 bytes

lambda e:"(|)D".index(e[-1])

Try it online!

Because we don't care about the eyes/nose, we can just look at the mouth (the last character) and find its index in a string with all the mouths, ordered from saddest to happiest :)

Python 3, 28 bytes

lambda e:"(|)D".index(e[-1])

Try it online!

Python 3, 28 bytes

lambda e:"(|)D".index(e[-1])

Try it online!

Because we don't care about the eyes/nose, we can just look at the mouth (the last character) and find its index in a string with all the mouths, ordered from saddest to happiest :)

Source Link
RGS
  • 14.2k
  • 1
  • 62
  • 117
Loading

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