Contact: aviboots(AT)netvision.net.il
41,195 questions
53,691 answers
573 users
import re def insert_space(s): words = re.findall('[A-Z][a-z]*', s) return ' '.join(words) s = 'PythonJavaPascal' print(insert_space(s)) ''' run: Python Java Pascal '''
import re def insert_space(s): words = re.findall('[A-Z][a-z]*', s) s = "" for word in words: s += word + ' ' return s s = 'PythonJavaPascal' print(insert_space(s)) ''' run: Python Java Pascal '''