Finding capitalized words

Report a typo

Your task is to write a program that finds all capitalized words and digits in an input string. Please print them in the same order as in the example output.

Sample Input 1:

Albert Einstein was born in 1879. His IQ has been estimated to be between 160 and 180.

Sample Output 1:

Capitalized words: Albert, Einstein, His, IQ
Digits: 1879, 160, 180
Write a program in Python 3
import re

string = input()
# your code here
___

Create a free account to access the full topic