fork download
  1. # your code goes here
  2. def punyaHuruf(kataPertama, kataKedua):
  3. list_pertama = [char for char in kataPertama]
  4.  
  5. for x in list_pertama:
  6. if x.lower() not in kataKedua.lower():
  7. return False
  8. return True
  9.  
  10.  
  11. print(punyaHuruf('cat', 'antarctica'))
  12. print(punyaHuruf('cat', 'australia'))
  13. print(punyaHuruf('cat', 'ANTARCTICA'))
Success #stdin #stdout 0.01s 7016KB
stdin
Standard input is empty
stdout
True
False
True