Re: A Question about strings in lists
- To: mathgroup at smc.vnet.net
- Subject: [mg102261] Re: A Question about strings in lists
- From: pfalloon <pfalloon at gmail.com>
- Date: Mon, 3 Aug 2009 05:46:24 -0400 (EDT)
- References: <h53nup$1ga$1@smc.vnet.net>
On Aug 2, 7:57 pm, Marwa Abd El-Wahaab <m.a.elwah... at gmail.com> wrote:
> Dear Sir,
>
> I have a question about lists
>
> If I recall a protein sequence for example, the output will be
>
> { ACDQXXYWT ............... }
>
> This output contains amino acids but as one element in list & its length is
> =1
>
> How can I transform this one element to this form
>
> {A,C,D,Q,X,X,Y,W,T,......... }
>
> So, the length will be number of amino acids the protein contains
>
> I need your advice
>
> Thanks in advance
>
> *Marwa Ali Abd El Wahaab
> Teaching Assistant*
> Faculty of Engineering
> Mansoura University
In[1]:= s = {"ABCDEF"};
In[2]:= Characters[First[s]]
Out[2]= {A,B,C,D,E,F}
Mathematica has many functions for working with strings which are
fairly well-documented, and in a case like this shouldn't be too hard
to find.