LearnPy Hub
← Regular Expressions problems
Easy

Words With a Capital Letter

Print the words that start with a capital letter, separated by spaces (or none), using re.findall(r'\b[A-Z]\w*', text).

Input

One line.

Output

One line.

Sample 1

Input
I live in Dhaka with Mim
Output
I Dhaka Mim

Sample 2

Input
nothing here
Output
none
solution.py
Output appears here
Words With a Capital Letter · Python practice problem · LearnPy Hub