Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Equivalent Tao solutions for some problems from comp.lang.python
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Limin Fu  
View profile  
 More options May 9 2005, 10:29 am
From: Limin Fu <fu.limin....@gmail.com>
Date: Mon, 9 May 2005 16:29:03 +0200
Local: Mon, May 9 2005 10:29 am
Subject: Equivalent Tao solutions for some problems from comp.lang.python
Hi!

This thread will contain equivalent solutions in Tao language for some
interesting problems I found in comp.lang.python.

Anybody are welcome to add something to this thread, so that people
used Python can get a quick impression about Tao just by reading this
thread.

Creation of similar threads for other languages are also appreciated.

Please include a title of the problem and a link where it can be found
in the groups or forums of other languages.

Cheers,

Limin


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Limin Fu  
View profile  
 More options May 9 2005, 10:36 am
From: Limin Fu <fu.limin....@gmail.com>
Date: Mon, 9 May 2005 16:36:58 +0200
Local: Mon, May 9 2005 10:36 am
Subject: Re: Equivalent Tao solutions for some problems from comp.lang.python
The first one:

[PROBLEM]
replace string patern with different value
By aji...@gmail.com,
http://groups-beta.google.com/group/comp.lang.python/browse_frm/threa...

> I would like to replace string with different values,
> For example :
> source = 'kode1 bla bla kode1 bla kode1'
> I have a list with each member will replace each of kode1.
> L = [11,22,33]
> So the new source will become:
> newsource = '11 bla bla 22 bla 33'

[Tao solution]

source = "kode1 bla bla kode1 bla kode1";
L=[11,22,33];

i=-1;
repeat( source=~s/kode1/""+L[i++]/ );

Limin


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google