Jump to content

Text processing with python


Recommended Posts

I'm new to python and i wanna do some text processing with it. So, I have one file that contains this type of text:

text["ro"][13361] = "Some text 1"

text["ro"][13362] = "Some text 2"

text["ro"][*3363] = "Some text 3"

text["ro"][13364] = "Some text 4"

Then I have a bunch of files that contains only the text between the double quotes

say ( "Some text 1" )

say ( "Some text 2" )

say ( "Some text 3" )

say ( "Some text 4" )

My need is to make this thing:

Replace the text from the bunch of files with this:

say ( text [ LC ( ) ] [ 13361 ] )

say ( text [ LC ( ) ] [ 13362 ] )

say ( text [ LC ( ) ] [ 13363 ] )

say ( text [ LC ( ) ] [ 13364 ] )

I'm thinking that python is the best way to do this...but I don't know how....if anyone can help me I would appreciate!

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.