Friday, October 10, 2014

Copy and pasteThe initial string of text that is to be converted will be a string of contiguous...

Copy and pasteThe initial string of text that is to be converted will be a string of contiguous words. One word is differentiated from another by having the first letter of the word capitalised. The string must not include any punctuation marks. Write a function called parse() that accepts a string of the type just described and separates the words by inserting a space between each.Ensure your function returns the parsed string without any leading spaces.[Hint: Traverse through the given list. Keep adding each element of the given list in a new list, if the element is uppercase then add a space “ ” before adding the element. Remember to return the new list without any space in front of the first word”.]your question here...

No comments:

Post a Comment