T
T
Timebird2017-09-30 04:14:43
Python
Timebird, 2017-09-30 04:14:43

How to replace words in a sentence using split-join?

Let there be a sentence with the article 'a' or 'an'. How to replace these articles in it with 'the' using split and join?
Can you give an example? I broke my head over such an elementary thing ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
planc, 2017-09-30
@Timebird

'the'.join('blabla bla for example an ILO convention'.split('an'))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question