MathGroup Archive 2006

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

Search the Archive

RE: Manipulate list elements

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67727] RE: [mg67700] Manipulate list elements
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Thu, 6 Jul 2006 06:51:59 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Paul,

> I have a list of words. These words are written in capital 
> letters. I need a list with these words in lower case 
> letters. How can I manipulate the list elements that the 
> capital letters become lower case letters?
> Example: list={{ABILITY, CAPABILITY},{PERSON, FLY}} 
> =>list={{ability, capability},{person, fly}}

As it stands, you don't have a list of words.  What you have, which you can
check by mapping Head[] to the list, is a list of symbols.  For example, 

	wtf = {ABILITY, "ABILITY"};
	Head[#] & /@ wtf

Fix this problem, then you can use the function ToLowerCase to achieve your
goal

	uclist = {{"ABILITY", "CAPABILITY"}, {"PERSON", "FLY"}}
	lclist = ToLowerCase[#] & /@ uclist

Regards,

Dave


  • Prev by Date: Repost --- Another limit problem
  • Next by Date: RE:Simplest question: How to control some values in Input dialog box
  • Previous by thread: Re: Manipulate list elements
  • Next by thread: Re: Manipulate list elements