I would like to write a function which produces a table of the frequencies with which various letters of the alphabet are found in some textual input.
Here is what I did:
In[212]:=
wordInput = "abcdasdagfkahjbfjasfjas3598713952/35'2.35;'235.f";
freq[StringInput_] :=
Tally[Table[
StringTake[StringInput, {n}], {n, 1, StringLength[StringInput]}]];
freq[wordInput]
Out[214]= {{"a", 6}, {"b", 2}, {"c", 1}, {"d", 2}, {"s", 3}, {"g",
1}, {"f", 4}, {"k", 1}, {"h", 1}, {"j", 3}, {"3", 5}, {"5",
5}, {"9", 2}, {"8", 1}, {"7", 1}, {"1", 1}, {"2", 3}, {"/",
1}, {"'", 2}, {".", 2}, {";",
1}}["abcdasdagfkahjbfjasfjas3598713952/35'2.35;'235.f"]
It did create a table of frequencies, but at the end it has this tail
["abcdasdagfkahjbfjasfjas3598713952/35'2.35;'235.f"]
How can I get rid of it?

Clear[freq]and try again. – Carl Woll Apr 29 '17 at 01:22