Username I may understand that you think using an external c++ code to call from python can (maybe) lead to higher performance, but the cost of writing, debugging and readability is really too high.
Also, you are missing the part on how python can use that code...
And it may be a little to advanced...
Easy and understandable code..but a bit long.
def spell(word, len):
#your code goes here
list = 
for i in word:
word = input()
len = len(word)