Skip to content

Instantly share code, notes, and snippets.

@winarcooo
Last active July 12, 2020 10:32
Show Gist options
  • Save winarcooo/23f2387a23b72a929afa126d0aca343d to your computer and use it in GitHub Desktop.
Save winarcooo/23f2387a23b72a929afa126d0aca343d to your computer and use it in GitHub Desktop.
[contain love] #hackerrank #python
# Enter your code here. Read input from STDIN. Print output to STDOUT
import sys
def solution(baseWord, words):
counter = 0
for word in words.split():
if set(baseWord).issubset(set(word)):
counter += 1
return counter
a = "love"
b = "vole svlove vloe asd wertwert svvolve"
def main():
print(solution(a, b))
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment