samedi 13 juillet 2019

Can we check if two or more sub strings are in string in python

I am trying to make a program that can check if two or more sub strings are in 1 string using python, can you tell me how can i do this

str = "I like apple do you like apples?"

if 'apples' or 'like' in str:
    print('yes, I like apples')

Aucun commentaire:

Enregistrer un commentaire