[Tutor] Python strings example
Alan Gauld
alan.gauld at yahoo.co.uk
Mon Apr 26 14:45:29 EDT 2021
On 26/04/2021 17:20, Ankit Gupta wrote:
> as I can understand you want to return TRUE if sentence contain at least
> one character or at least one digit or both.
Nope, he explicitly says he wants AND...
>> the string passed to the function contains at least one digit character and
>> one alphabet character, else the function must return False.
So AND is the correct operator.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list