View Single Post
Old 09-24-2021, 01:30 AM   #3
Ted Friesen
Nameless Being
 
Thanks for the reply Hobnail, but I was hoping for a single solution and I have found it.
By adding this line the hyphen is exchanged for a space before textnum is split into words.

Code:
    current = result = 0				
 ==>   textnum = textnum.replace('-',' ')	#replace hyphen with space
    for word in textnum.split():
  Reply With Quote