53
\$\begingroup\$

Challenge

Print the following characters:

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890

The catch is that you may not use any one of them in your code.

You may print them in arbitrary order, with or without a leading or trailing newline, but you may not print any other characters.

Rules

  • You may not use any characters from the set mentioned above
  • You may use any other characters
  • No cheating
  • Standard loopholes banned
  • This is , shortest answer wins.

Clarifications

  • If your language uses a different charset, you may not use codepoints in that charset that correspond to alphanumeric characters.
  • Returning a string from a function is considered a valid form of output.
  • You may return a char array.
\$\endgroup\$
17
  • 8
    \$\begingroup\$ This is somewhat ambiguous. If you mean output those raw bytes without those bytes in your code, then you should specify that you can't use the codepoints of these characters, even if they map to something else in your language's codepage. \$\endgroup\$
    – FlipTack
    Jan 5, 2017 at 19:57
  • 13
    \$\begingroup\$ So this means that I cannot use any letters or numbers in my source code. Well, that pretty much takes out any non-esoteric languages. \$\endgroup\$
    – R. Kap
    Jan 5, 2017 at 20:04
  • 4
    \$\begingroup\$ What if the language is just raw bytes (as opcodes) that don't have a representation? Am I free to use any characters? \$\endgroup\$
    – FlipTack
    Jan 5, 2017 at 22:03
  • 1
    \$\begingroup\$ @briantist it's fine if they're internally represented by ints, but the characters themselves have to be printed. \$\endgroup\$
    – anna328p
    Jan 5, 2017 at 23:15
  • 3
    \$\begingroup\$ @R.Kap Javascript could work, provided you don't think of it as eso \$\endgroup\$ Jan 5, 2017 at 23:32

53 Answers 53

1
2
4
\$\begingroup\$

Python 3, 119 114 bytes

ᵖʳⅰₙt(*fiˡtₑʳ(stʳ.ⅰˢªˡₙuᵐ,ᵐªp(ᶜʰʳ,ʳªⁿgₑ(ºʳd('{')))),ˢᵉᵖ='')

Try it online!

-5 from using fi and st ligatures thanks to m90. I'm going to write str in my Python code from now on.

Python 3, 119 117 bytes

_=stʳⁱⁿᵍ=ºʳᵈ('>');ᵖʳⁱⁿᵗ(__ⁱᵐᵖºʳᵗ__([*ᵛªʳˢ()][~_+_]).ᵖʳⁱⁿᵗªᵇˡᵉ[:_])

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ cheaty as hell, +1 \$\endgroup\$
    – des54321
    Apr 20, 2022 at 3:50
  • 1
    \$\begingroup\$ I think these can be shortened by taking further advantage of the NFKC normalisation to get multiple letters from one codepoint in certain places, using U+FB01 LATIN SMALL LIGATURE FI and U+FB06 LATIN SMALL LIGATURE ST. \$\endgroup\$
    – m90
    Apr 25, 2022 at 13:33
  • \$\begingroup\$ @m90 You're right. It's a shame ㏌ and ㏑ aren't classified as letters, even though they normalize to letters. \$\endgroup\$
    – benrg
    Apr 25, 2022 at 17:32
3
\$\begingroup\$

JavaScript, 371 bytes

(ÿ=(À=!($={})+(ø=""))[ò=ì=+[]],ý=(Þ=!ò+ø)[++ì],ó=(Ó=$+ø)[ì],Ú=$.$+ø,ú=Þ[í=ì+ì],é=Þ[î=í+ì],ç=Ó[Ì=î+í],þ=Þ[ò],Î=Ì+í,$=$[Ç=ç+ó+Ú[ì]+À[î]+þ+ý+ú+ç+þ+ó+ý][Ç],$($((È=ý+é+þ+ú+ý+Ú[ì])+`"${ÿ+ó+ý}(_=ò;_<Ì<<Ì;)ø+=${(ß="\\")+ì+í+î+þ+ý+(Ð=(ð=ß+ì)+Ì)+ì+Ç[í]+(æ=ð+í*í+Î)}.${ÿ+ý+ó+Ð+Ì+ð+ò+î+Ð+ò+À[ì]+ý+ð+ò+î+ó+Ú[í]+é}(_++);${È} ø.${ý+é+ð+í*î+ò+À[í]+À[ì]+ç+é}(/${ß+ß+ð+í+Î}|_/${æ},'')"`)()))()

The (...)() scaffolding is only there to make it easier to paste it into the F12 console, and doesn't count toward the total, as per the rules. Output:

"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

This is based on the same method as the other JavaScript solutions: using string coercion to get at some internal string constants to build a string to get at the constructor of the constructor of an object. A constructor is a function, so its constructor is Function, which allows us to build a new one, essentially like eval.

One difference with previous solutions is that I tried to use more ‘sensible’ variable names, which made it easier to try out new ideas:

ç   c         Ç   constructor        ò   0      ß   \
é   e         Ó   [object Object]    ì   1      ð   \1
ó   o         Ú   undefined          í   2      Ð   \15
þ   t         Þ   true               î   3
ú   u                                Ì   5
                                     Î   7
ÿ   f         À   false 
ý   r         È   return 
æ   \147 = g

The trick that ended up saving the most was to first generate way too much and then filtering out all the characters I didn't need.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Does this print with the "s around the text? \$\endgroup\$
    – Wheat Wizard
    Jan 8, 2017 at 1:08
  • \$\begingroup\$ It looks like you're using ISO-8859-1 charset. Am I wrong? Can you clarify? \$\endgroup\$ Jan 8, 2017 at 19:06
3
\$\begingroup\$

Javascript, 1273 1351 1610 bytes

This solution works essentially the same way as the other two answers on this thread here and here, where it uses letters from the true, false, undefined, and [object Object] strings to build the functions that it needs to generate the other letters.

Since a good number of the letters are already put into the object, I tried adding all of the remaining minuscule letters and the numbers to the object, and then applied toUpperCase to all of the values in the object to generate the missing majuscule letters.

Update:

I was able to improve the way that the octal values were being set, but they're still taking up 13 x 30 bytes (or they will be 30 bytes each after I changes the numbers to different keys), each one now follows this general pattern: $.ž=\'\\'+$.一+$.七+$.二+'\';.

An additional 49 bytes can be easily taken out by switching the keys for the numbers to 2 byte characters.

Current submission:

$=~[];_={ť:!""+"",ň:![]+"",û:$._+'',ô:{}+"",ø:''};$={零:++$,ƒ:_.ň[$],ť:_.ť[$],一:++$,â:_.ň[$],ř:_.ť[$],ô:_.ô[$],ň:_.û[$],二:++$,ľ:_.ň[$],û:_.ť[$],ƅ:_.ô[$],ď:_.û[$],三:++$,ŝ:_.ň[$],ĵ:_.ô[$],四:++$,ě:_.ň[$],五:++$,ĉ:_.ô[$],î:_.û[$],六:++$,七:++$,八:++$,Ô:_.ô[$],九:++$};_.ĉ=$.ĉ+$.ô+$.ň+$.ŝ+$.ť+$.ř+$.û+$.ĉ+$.ť+$.ô+$.ř;_.ř=$.ř+$.ě+$.ť+$.û+$.ř+$.ň;_.ƒ=(0)[_.ĉ][_.ĉ];_.ƒ(_.ƒ(_.ř+' "$.Û=\'\\'+$.一+$.二+$.五+'\';$.Ĉ=\'\\'+$.一+$.零+$.三+'\';$.Ě=\'\\'+$.一+$.零+$.五+'\';$.ĝ=\'\\'+$.一+$.四+$.七+'\';$.ĥ=\'\\'+$.一+$.五+$.零+'\';$.ǩ=\'\\'+$.一+$.五+$.三+'\';$.ӎ=\'\\'+$.一+$.五+$.五+'\';$.ƥ=\'\\'+$.一+$.六+$.零+'\';$.ǫ=\'\\'+$.一+$.六+$.一+'\';$.ư=\'\\'+$.一+$.六+$.六+'\';$.ŵ=\'\\'+$.一+$.六+$.七+'\';$.ӽ=\'\\'+$.一+$.七+$.零+'\';$.ŷ=\'\\'+$.一+$.七+$.一+'\';$.ž=\'\\'+$.一+$.七+$.二+'\';"')())();_.ƒ(_.ƒ(_.ř+' "_.â=\''+$.Ô+$.ƅ+$.ĵ+$.ě+$.ĉ+$.ť+'.'+$.ǩ+$.ě+$.ŷ+$.ŝ+'($).'+$.ƒ+$.ô+$.ř+$.Ě+$.â+$.ĉ+$.ĥ+'\';_.ƅ=\''+$.ť+$.ô+$.Û+$.ƥ+$.ƥ+$.ě+$.ř+$.Ĉ+$.â+$.ŝ+$.ě+'\';"')())();_.ƒ(_.ƒ(_.ř+' "'+_.â+'((ǩ)=>{$[ǩ.'+_.ƅ+"()]=($[ǩ]+'')."+_.ƅ+"()});"+_.â+"((ǩ)=>{_.ø+=$[ǩ];});"+$.â+$.ľ+$.ě+$.ř+$.ť+'(_.ø);"')())()
\$\endgroup\$
2
  • 1
    \$\begingroup\$ This seems interesting, but as it is, it's not very golfed. Just removing whitespace would save 74 bytes, single quotes could be used for strings that contain double quotes, and 3-byte Unicode characters could be replaced with less expensive ones. \$\endgroup\$
    – Dennis
    Jan 8, 2017 at 1:15
  • \$\begingroup\$ @Dennis true, though I think the biggest problem with this method right now is that there are so many characters being set with octal codes. \$\endgroup\$
    – martin
    Jan 8, 2017 at 2:03
3
\$\begingroup\$

C (clang), 132 bytes

é,ú,í,ó;_(*$){ú-=ú;í=++ú+ú;ó=í*í<<í*í;*$++=!é?é=í<<í*í,é+=í<<í+ú:é;é+=(é+ú!=ó+í*~í?:í<<í)-(é-ó-í*~í==í<<í<<í)*í*~í;~é>í-ó<<ú&&_($);}

Try it online!

Edit: -32 bytes thanks to @ceilingcat

\$\endgroup\$
1
2
\$\begingroup\$

CJam, 15 bytes

"{`[@:/"_:,:^\-

Try it online!

Explanation

"{`[@:/" e# Push this string. Note that these are the characters just above and
         e# below the a-z, A-Z and 0-9 ranges, respectively.
_        e# Get a copy of the string.
:,       e# Turn each character into a range, i.e. all characters from the null byte
         e# to the the character below the given one. E.g. { is turned into "...xyz".
:^       e# Fold symmetric set difference over the list. Gives us the characters that
         e# appear in an odd number of the strings. Those are the letters, the digits
         e# as well as `, @ and /.
\        e# Pull the other copy of the string on top.
-        e# Remove these characters from the string. That leaves only the alphanumerics.
\$\endgroup\$
2
\$\begingroup\$

𝔼𝕊𝕄𝕚𝕟, 8 chars / 19 bytes

ᶐ+ᶛ+⩥Ⅹă⬯

Try it here!

is the uppercase alphabet, is the lowercase alphabet, and ⩥Ⅹă⬯ is range () from 0 to 10 (, the unicode roman numeral) minus 1, joined by (ă) nothing ().

\$\endgroup\$
0
2
\$\begingroup\$

Perl 6, 50 bytes

{([~] '/'^..^':')~([~] '@'^..^'[')~[~] '`'^..^'{'}

Block that returns the string since I don't think there's any way to print without using alphanumeric characters.

Try it online!

\$\endgroup\$
2
\$\begingroup\$

Husk, 12 bytes

ṁ?;ȯ→½;□…" ~

Try it online!

This was much more difficult in Husk than I expected - which probably indicates that it isn't an optimal solution!

First creates a list of all printable ASCII characters …" ~, and then aps a function across each of them. The function checks (?) whether each character is alphanumeric (): if it is, then it returns it as a list; if it isn't it returns an empty list (ȯ→½;), by the complicated method of first creating a one-element list (;), dividing it into two halves (½), and then selecting the second (smaller) half ().

\$\endgroup\$
2
  • \$\begingroup\$ @Zgarb @Leo I'd hoped I could use the 'empty list' command (ø) here, but ṁ?;ø□…" ~ doesn't seem to infer, and when I wrap it into a lambda as ṁλ?;ø□⁰)…" ~ it seems to output integers instead of characters... any insight why? \$\endgroup\$ Nov 18, 2020 at 11:06
  • \$\begingroup\$ Empty list ø is a constant, and you cannot use a constant in fif . The second one is.. interesting. You may have discovered how to use if2 \$\endgroup\$
    – Razetime
    Nov 18, 2020 at 12:49
1
\$\begingroup\$

WSF, 145 bytes

Prtty much a direct translation of Dennis's answer.

Stack Exchange cannot display the code, so here is a reversible xxd hexdump:

00000000: 2020 2020 2020 2020 2020 2020 2020 2020                  
00000010: 0a20 200a 2020 200a 2020 2020 2020 2020  .  .   .        
00000020: 2020 2020 200a 2020 2020 2020 2020 200a       .         .
00000030: 2009 0920 0920 0920 0920 2009 0a09 200a   .. . . .  ... .
00000040: 2020 2020 0a20 200a 0909 2020 0920 2009      .  ...  .  .
00000050: 0a09 200a 200a 0a20 200a 2020 200a 2020  .. . ..  .   .  
00000060: 2020 200a 2020 2020 2020 0920 0920 0920     .      . . . 
00000070: 2009 0a09 200a 2020 2020 0a20 200a 2020   ... .    .  .  
00000080: 0909 200a 2020 0909 0920 0920 2009 0a09  .. .  ... .  ...
00000090: 0a

The interpreter runs it perfectly, producing the following output:

0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz
\$\endgroup\$
1
\$\begingroup\$

Stacked, 70 bytes

(π²²~~:' '#.-):'='#.'#'#.%+..#:'/'#.(πτ/~_:π²~~+|>)+#:++$∪#/!

Leaves a character array on the top of the stack. This simply uses some character and pi magic. Try it here!

\$\endgroup\$
3
  • \$\begingroup\$ The link doesn't do anything when I paste your code in there... \$\endgroup\$ Jan 7, 2017 at 6:51
  • \$\begingroup\$ @PatrickRoberts yeah, because it's a function. Add put to the end to see the result. \$\endgroup\$ Jan 7, 2017 at 7:06
  • \$\begingroup\$ Ah, neat okay. I don't know Stacked obviously ^^; \$\endgroup\$ Jan 7, 2017 at 7:13
1
\$\begingroup\$

x86 machine code, 30 bytes

Hexdump:

8b d7 8b f9 2b c9 b1 1a b0 7b 2a c1 aa 2c 20 aa
2c 11 3c 3a 7d 01 aa e2 ef 88 0f 8b fa c3

Represented as if it had Windows 1252 encoding, with control characters using the Control Pictures visualization:

‹×‹ù+ɱ␚°{*Áª, ª,␑<:}␁ªâïˆ␏‹úÃ

It's 32-bit code (IA-32) using fastcall calling convention - receives the pointer to output in ecx.

Assembly code:

    mov edx, edi;
    mov edi, ecx;
    sub ecx, ecx;
    mov cl, 26;
myloop:
    mov al, 'a' + 26;
    sub al, cl;
    stosb;
    sub al, 'a' - 'A';
    stosb;
    sub al, 'A' - '0';
    cmp al, '9'+1;
    jge myskip;
    stosb;
myskip:
    loop myloop;
    mov [edi], cl;
    mov edi, edx;
    ret;

Does 26 iterations (cl = 26 down to 1). At each iteration, calculates and outputs a lowercase letter, an uppercase letter and a number. If the number is out of range, doesn't output it.

The output is written to address in ecx, and null-terminated.

The result:

aA0bB1cC2dD3eE4fF5gG6hH7iI8jJ9kKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ

Interesting things about this code:

  • Save-restore of the edi register is usually done by push-pop, but push edi is alphanumeric (W) - so I did it with mov edx, edi and mov edi, edx
  • Zeroing a register is usually done by xor, but to avoid an alphanumeric character, I did it with sub; same byte count
  • jge is one of only a few conditional jump instructions that are allowed
\$\endgroup\$
2
  • \$\begingroup\$ I don't quite get it. It's definitely not a DOS code (not a single 66 prefix despite 32-bit instructions). Then what's it? A function? Then what calling convention does it follow? \$\endgroup\$
    – Ruslan
    Jan 8, 2017 at 16:43
  • \$\begingroup\$ I've clarified my answer \$\endgroup\$
    – anatolyg
    Jan 8, 2017 at 16:46
1
\$\begingroup\$

PHP, 339 bytes (no bitwise string)

Of course not the shortest code, but an alternate method using the Array to string cast.

<?=$_=([]._)[-~-~-~-_],++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,$_=([]._)[_],++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,$_=-_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_;?>

([]._) cast an array to string leading "Array_", then you can take both "A" and "a" and use increment string method.

-~-~-~-_ is giving "3" using multiple minus bitwise not() (maybe this can be improved)

\$\endgroup\$
1
\$\begingroup\$

GW-BASIC, 109 bytes

Hex dump of file:

FE 88 A9 C5 C2 1A 0E BF  11 A2 17 7B DC 10 87 D6
B8 8D A1 F3 E2 F3 A3 18  2B 1C E7 A1 14 7D 8D 3E
15 27 0C 2C 0B 2E F9 F1  C0 7D C4 5D 00 F1 89 C4
82 A5 D8 3C C9 CF 17 F0  D7 89 AF 40 8A AE 9D 03
8B EE A4 91 91 2F 5B DE  D5 AA 18 FE B9 AD C8 3A
5D F7 04 1A F2 1A 7C EC  DF 2C DD 88 D3 94 3B 40
7F EB B9 2C 1A B2 F3 C0  8C D3 95 10 1A

As you can see, none of the forbidden characters (30..39, 41..5A, 61..7A) are used. To run, use LOAD"filename.bas and then RUN.

\$\endgroup\$
2
  • \$\begingroup\$ Could you include the source, even if that includes the restricted bytes? \$\endgroup\$
    – MD XF
    Jun 5, 2017 at 3:16
  • \$\begingroup\$ Represented as CP1125 encoding with control characters using the Control Pictures visualization: ■Ий┼┬␚␎┐␑в␗{▄␐З╓╕Нбґтґг␘+␜чб␔}Н>␕'␌,␋.їё└}─]␀ёЙ─Ве╪<╔╧␗Ё╫Йп@КоЭ␃ЛюдСС/[▐╒к␘■╣н╚:]і␄␚Ґ␚|ь▀,▌И╙Ф;@␡ы╣,␚▓ґ└М╙Х␐␚ \$\endgroup\$ Jan 12, 2023 at 23:10
1
\$\begingroup\$

Pyt, 3 bytes

ɬɳǰ

Explanation:

ɬ           Pushes "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
ɳ          Pushes "0123456789"
ǰ         Joins the strings on the stack with no delimiter
Implicit print

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Stax, 2 bytes

Éè

Run and debug it

This isn't very interesting. Just a built-in constant. I used the packed program encoding to avoid alphanumerics, but normally, this is known as VL.

\$\endgroup\$
1
\$\begingroup\$

Befunge-93, 38 33 bytes

"/*@:`:":^
,\~+:" "->!#$_::%$\~-:

Try it online!

Uses a different method than this answer. The first line pushes these six numbers: (47, 10 + 32), (64, 26 + 32), (96, 26 + 32), representing the 0-9, A-Z and a-z ranges respectively (lengths are summed with 32 so that they can all be printable non-alphanumeric characters, as well as 32 itself), as well as an extra number that gets consumed shortly after (can be any truthy value). Then, execution jumps to the second line, which loops to print all of these ranges.

\$\endgroup\$
1
\$\begingroup\$

05AB1E, 34 bytes

žĆт₂·-.$Ð₆₂-£?₂₆₂-->.$Ð₂£?₆ÍÍ.$₂£?

Try it online!

žĆт₂·-.$Ð₆₂-£?₂₆₂-->.$Ð₂£?₆ÍÍ.$₂£?  # full program
             ?                      # output without trailing newline...
            £                       # first...
         ₆                          # 36...
           -                        # minus...
          ₂                         # 26...
            £                       # characters of...
žĆ                                  # the 05AB1E code page...
      .$                            # excluding the first...
  т                                 # 100...
     -                              # minus...
   ₂                                # 26...
    ·                               # times 2...
      .$                            # characters
                         ?          # output without trailing newline...
                        £           # first...
                       ₂            # 26...
                        £           # characters of...
        Ð                           # the 05AB1E code page excluding the first 48...
                    .$              # plus...
              ₂                     # 26...
                  -                 # minus...
               ₆                    # (36...
                 -                  # minus...
                ₂                   # 26)...
                   >                # plus 1...
        Ð           .$              # characters
                                 ?  # output without trailing newline...
                                £   # first...
                               ₂    # 26...
                                £   # characters of...
                      Ð             # the 05AB1E code page excluding the first 65...
                             .$     # plus...
                          ₆         # 36...
                           Í        # minus 2...
                            Í       # minus 2...
                      Ð      .$     # characters
\$\endgroup\$
1
  • \$\begingroup\$ I'm pretty sure D is alphanumeric \$\endgroup\$
    – anna328p
    Nov 18, 2020 at 1:29
1
\$\begingroup\$

Jelly, 5 bytes

⁵Ḷ;ØẠ

Try it online!

Outputs 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

How it works

⁵Ḷ;ØẠ - Main link. Takes no arguments
⁵     - 10
 Ḷ    - [0, 1, ..., 9]
   ØẠ - “ABC...XYZabc...xyz”
  ;   - Concatenate
        Implicitly smash together into a string and print
\$\endgroup\$
0
\$\begingroup\$

Charcoal, 10 bytes

βα⪫E…⁰χIιω

Try it online!

Explanation

β            Lowercase alphabet (implicitly printed)
 α           Uppercase alphabet (implicitly printed)
  ⪫        ω Join by ""
   E   Iι  Map with cast
     …⁰χ     Range from 0 to 10
\$\endgroup\$
1
  • \$\begingroup\$ βαFχI﹪⊕ιχ works (9 bytes). might change later \$\endgroup\$
    – ASCII-only
    Nov 4, 2018 at 6:35
0
\$\begingroup\$

MathGolf, 12 bytes

▄_Äδ☻♥+$♂(Ä└

Try it online!

Explanation

▄              lowercase alphabet as string
 _             duplicate TOS
  Äδ           capitalize each letter and push to the stack
    ☻♥+        push 16+32 = 48
       $       pop(48), push ord(48) = "0"
        ♂(     push 10-1 = 9
          Ä    start block of length 1
           └   push TOS+1 without popping (pushes "1"-"9")
\$\endgroup\$
0
\$\begingroup\$

!@#$%^&*()_+, 43 bytes

>^^!(!_++^!!@[_^+)`!(!_++^!!@{_^+)	(!#_^_)#

Try it online! Outputs ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz9876543210.

Perfect language for the challenge. That long space you see is a tab.

>^^!(!_++^!!@[_^+)

This starts a loop from "A"-1 (">" + 2) and continues printing while incrementing up until "[" ("Z" + 1), printing "A".."Z". Similar for the letters from "a" to "z".

	(!#_^_)#

The tab has char code 0x09. This is a loop that counts down from 9 to 1, printing them as numbers. Then, 0 is printed, being the last value of the loop iterator.

\$\endgroup\$
0
\$\begingroup\$

Vyxal, 5 bytes

«¬`«Ė

Try it Online!

«¬`«  # (not at all) compressed string 'kr' (constant for alphanumeric values)
    Ė # Evaluate
\$\endgroup\$
0
\$\begingroup\$

Zsh, 47 bytes

__=({$?..\{})
__=${__//[:-@[-\`\{]}
<<<${__// }

Attempt This Online!

Store the range of characters between 0 (obtained as $?) and } into $__, then removes all the special characters in between (: to @, [ to `, and {), and finally removes all the spaces (effectively joining the array)

\$\endgroup\$
0
1
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.