mercredi 31 janvier 2018

Python print results of (If ... in ....)

keyinput = input()

type(keyinput) # I type "appleandgold"

B = "appleblue"

If keyinput  in B:
    # it can check that have same word in both (apple) (i tried and it work)

 print("results of A in B")

Result should be "apple" how i print results from IF .. IN ?

i want output look like this: apple

Aucun commentaire:

Enregistrer un commentaire