Python: Split a string at uppercase letters
Python Regular Expression: Exercise-43 with Solution
Write a Python program to split a string at uppercase letters.
import re text = "PythonTutorialAndExercises" print(re.findall('[A-Z][^A-Z]*', text))
['Python', 'Tutorial', 'And', 'Exercises']
Visualize Python code execution:
The following tool visualize what the computer is doing step-by-step as it executes the said program:
Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?