Last active
July 12, 2020 10:32
-
-
Save winarcooo/23f2387a23b72a929afa126d0aca343d to your computer and use it in GitHub Desktop.
[contain love] #hackerrank #python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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