Question: 
Write a function to put spaces between words starting with capital letters in a given string by using regex.


Model's Code:
import re

def capital_words_spaces(s):
    return re.sub(r'(?<!^)(?=[A-Z])', ' ', s)



Sample Correct Code:
import re
def capital_words_spaces(str1):
  return re.sub(r"(\w)([A-Z])", r"\1 \2", str1)


Asserts:
assert capital_words_spaces("Python") == 'Python'
assert capital_words_spaces("PythonProgrammingExamples") == 'Python Programming Examples'
assert capital_words_spaces("GetReadyToBeCodingFreak") == 'Get Ready To Be Coding Freak'


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 748 of 974: 565/748 (75.53475935828877%): success