PYTHON: Fill-in-the-Blanks

PYTHON: Fill-in-the-Blanks Program

If you're given a string that has "blanks" (underscores) and an array of words, you can easily fill in the blanks to that string:


Try it out for yourself, the underscores will be replaced by each word in words.

Feel free to use this code for yourself.

Happy Coding, @Code-Parser

Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to