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

deleted 15 characters in body
Source Link
Mukundan314
  • 13.7k
  • 1
  • 19
  • 62

Pyth, 8 bytes

x"(|)D"e

Try it online!

Exalanation

x"(|)D"e(Q)
 (Q) : Implicit evaluated input
 e : Last element of input
 "(|)D" : The string "(|)D"
x : First occurrence of the last element of input in "(|)D"

Pyth, 8 bytes

x"(|)D"e

Try it online!

Exalanation

x"(|)D"e(Q)
 (Q) : Implicit evaluated input
 e : Last element of input
 "(|)D" : The string "(|)D"
x : First occurrence of the last element of input in "(|)D"

Pyth, 8 bytes

x"(|)D"e

Try it online!

Exalanation

x"(|)D"e
 : Implicit evaluated input
 e : Last element of input
 "(|)D" : The string "(|)D"
x : First occurrence of the last element of input in "(|)D"
Source Link
Mukundan314
  • 13.7k
  • 1
  • 19
  • 62

Pyth, 8 bytes

x"(|)D"e

Try it online!

Exalanation

x"(|)D"e(Q)
 (Q) : Implicit evaluated input
 e : Last element of input
 "(|)D" : The string "(|)D"
x : First occurrence of the last element of input in "(|)D"

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