MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Help needed with List!

  • To: mathgroup at
  • Subject: [mg16921] Re: Help needed with List!
  • From: "Atul Sharma" <mdsa at>
  • Date: Thu, 8 Apr 1999 02:32:32 -0400
  • References: <7ec5kg$>
  • Sender: owner-wri-mathgroup at

I think you'll find IntegerDigits[ ] and Complement[ ] to be useful for this

In[9]:=    listA=123456

Out[9]=    123456
Out[10]=    12

In[11]:=    ida=IntegerDigits[listA]

Out[11]=    {1,2,3,4,5,6}
Out[12]=    {1,2}

In[13]:=    Complement[ida,idb]
Out[13]=    {3,4,5,6}

alvaroo at wrote in message <7ec5kg$cu2 at>...
>Sirs Probably these are FAQs but I am new in this newsgroup and I have not
>been able to solve them. I use Mathematica 3.0:  (i) I need to convert a
>integer number in List format. For example if I had the number 123456 I
>to convert it into {1,2,3,4,5,6}:  Is it possible with an instruction? And,
>(ii) I need to delete from a List A the common elements with other List B:
>for example if A = {1,2,3,4} and B = {1,2} I need to delete by an
>the elements 1, 2 of List B from List A to obtain List C = {3,4}.  I am
>working with integers with 10.000 digits or more so you can appreciate how
>helpful for me it would be to solve these questions.  Thanks in advance.
>-----------== Posted via Deja News, The Discussion Network ==----------
>       Search, Read, Discuss, or Start Your Own

  • Prev by Date: Re: Help needed with List!
  • Next by Date: FW: Plotting multiple outputs from cpu intensive functi
  • Previous by thread: Re: Help needed with List!
  • Next by thread: Re: Help needed with List!