generate functionSun, 20 Nov 2022

Translate each of the following English statements into a regular expression: a. Digit at the beginning of the string and a digit at the end of the string b. A string that contains only whitespace characters or word characters c. A string containing no whitespace characters

import re a = "^\d.*\d$" b = "^\w*|\s*$" c = "^\S*$"

Questions about programming?Chat with your personal AI assistant