471,348 Members | 1,340 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

string replace shortcut

Hello,

I am trying to replace some string with list objects:
>>my_text1="function1 function2"
from my_module_with_functions_1 import *
from my_module_with_functions_2 import *
# functions in module " my_module_with_functions_1 ":

my_func1 it's value "function1"

my_func2 it's value "function2"

# functions in module " my_module_with_functions_2 ":

my_func100 it's value "bla bla 1"

my_func200 it's value "bla bla 2"

.........now, we need find and replace functions from module "
my_module_with_functions_1 " and
replace them with functions from module " my_module_with_functions_2
"

with: my_text1.replace(items1,items2)

Result must be:
>>print my_text1.replace(items1,items2)
bla bla 1 bla bla 2
Regards,
Vedran

Sep 18 '07 #1
0 930

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Gurikar | last post: by
5 posts views Thread by John Baro | last post: by
4 posts views Thread by I_AM_DON_AND_YOU? | last post: by
15 posts views Thread by morleyc | last post: by
1 post views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.