Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Join two word in a item from a list python

I have this list:

['Fantasy', 'Young Adult', 'Paranormal', 'Paranormal Romance']

Is it possible to join the two words in an item like 'Young.Adult'

I mean in general, not for that two words(the list only contains max two words).

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

That should do it:

for word in ['Fantasy', 'Young Adult', 'Paranormal', 'Paranormal Romance']:
    print(word.replace(" ", "."))
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use