if not text[iisdecimal()return false return true print('is phone number?'print(isphonenumber('')print('is moshi moshi phone number?'print(isphonenumber('moshi moshi')when this program is runthe output looks like thisis phone numbertrue is moshi moshi phone numberfalse the isphonenumber(function has code that does several checks to see whether the string in text is valid phone number if any of these checks failthe function returns false first the code checks that the string is exactly characters then it checks that the area code (that isthe first three characters in textconsists of only numeric characters the rest of the function checks that the string follows the pattern of phone numberthe number must have the first hyphen after the area code three more numeric characters then another hyphen and finally four more numbers if the program execution manages to get past all the checksit returns true calling isphonenumber(with the argument 'will return true calling isphonenumber(with 'moshi moshiwill return falsethe first test fails because 'moshi moshiis not characters long if you wanted to find phone number within larger stringyou would have to add even more code to find the phone number pattern replace the last four print(function calls in isphonenumber py with the followingmessage 'call me at tomorrow is my office for in range(len(message))chunk message[ : + if isphonenumber(chunk)print('phone number foundchunkprint('done'when this program is runthe output will look like thisphone number foundphone number founddone pattern matching with regular expressions