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.
Regexps in programs
Finding capitalized words
Report a typo
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, 180Write a program in Python 3
import re
string = input()
# your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.