check if any list items are in a string

class Song:
    def __init__(self, artist, title):
        self._artist = artist
        self._title = title
            
    def checkArtist(self, name):
        return any(artistname in self._artist for artistname in name.split())

You need to return your boolean value!

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top