numberslist list(numbersfor idigit in enumerate(numberslist)numberslist[iint(digitif sum(numberslist! raise exception('the digits must add up to not % (sum(numberslist))return int(numbersreturn an int form of numbers response pyip inputcustom(addsuptotenno parentheses after addsuptoten here the digits must add up to not the digits must add up to not response inputstr(returned an intnot string response pyip inputcustom(addsuptotenhello invalid literal for int(with base ' response the inputcustom(function also supports the general pyinputplus featuressuch as the blanklimittimeoutdefaultallowregexesand blockregexes keyword arguments writing your own custom validation function is useful when it' otherwise difficult or impossible to write regular expression for valid inputas in the "adds up to example projecthow to keep an idiot busy for hours let' use pyinputplus to create simple program that does the following ask the user if they' like to know how to keep an idiot busy for hours if the user answers noquit if the user answers yesgo to step of coursewe don' know if the user will enter something besides "yesor "no,so we need to perform input validation it would also be convenient for the user to be able to enter "yor "ninstead of the full words pyinputplus' inputyesno(function will handle this for us andno matter what case the user entersreturn lowercase 'yesor 'nostring value when you run this programit should look like the followingwant to know how to keep an idiot busy for hourssure 'sureis not valid yes/no response want to know how to keep an idiot busy for hoursyes want to know how to keep an idiot busy for hoursy