Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to create a list of length n with the letters of the alphabet.

For example, if n = 3, by list would be {a,b,c}. If n=6, the list would be {a,b,c,d,e,f}.

Is there any easy way to do this?

share|improve this question

3 Answers 3

No need to use *CharacterCode[] :

letters[n_] := CharacterRange["a", "z"][[;; n]]

{"a", "b", "c"}
share|improve this answer
I'd say ugly but nice :) – Kuba May 23 '14 at 12:52
Ha, it works even with non-Latin alphabets.. It is new for me, that Mathematica can correctly understand Cyrillic ranges of symbols :) – Rom38 May 23 '14 at 13:03
@Rom38 It works with all letters of all types that exist as a contiguous block in the character space. – belisarius has settled May 23 '14 at 13:12
Yes, it is true, but just 3-4 years ago Mathematica had permanent problems with Cyrillic alphabet (mostly regarded to encodings) – Rom38 May 23 '14 at 14:50
 lttrsF = FromCharacterCode /@ (ToCharacterCode[#][[1]] + Range[0, #2-1]) &
 lttrsF["b", 4]
 (*  {"b", "c", "d", "e"}  *)
share|improve this answer

You might want to use FromCharacterCode:


gives a string consisting of the character with integer code n.

letters[n_] := StringSplit[FromCharacterCode[Range[97, 97 + n - 1]], ""]

{"a", "b", "c"}

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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