replace - python, help replacing first letters -


I need to change the first letters of the string. Which command should I use? I am writing a thing for the French which changes words in the last tense and I have changed the last letter i.e re u, but I need to make that change which j < Word2.endswith ("what word do you want to change in previous stress?") Word2 = word if word / Again "): word 3 = word 2 [: - 2] +" u "print word 3 alif word 2. AIDS ("IR"): word 3 = word 2 [: - 2] + "i" print word 3 alif word 2. "): Word 3 = word 2 [: - 2] +" e "print word 3 other: print" no "

I have done so far

If you do something like this

  word = 'tu as' changes = {'je' : "You", "to": 'to ace'). The word (word, 'nope')   

This will require you to change with "I / you"

It is a very naive knife in making a translator ... You can also insert all the words in a single dictionary.

  change = {'re' you ' 'IR': 'I', 'Er': 'E', 'J': "oats", 'tu': 'tu'}}   

and then through each sentence "synonyms" in sentences from " Repeat the last tense to change the word.

Disclaimer: Of course, it does not consider the grammar of the language you are using. Full Translation This "A-K-B" type Is much higher than the exchange of.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -