HackerRank Language

  • + 0 comments
    import re
    s1 = "C:CPP:JAVA:PYTHON:PERL:PHP:RUBY:CSHARP:HASKELL:CLOJURE:BASH:SCALA: ERLANG:CLISP:LUA:BRAINFUCK:JAVASCRIPT:GO:D:OCAML:R:PASCAL:SBCL:DART: GROOVY:OBJECTIVEC"
    sl = re.split(r'\W',s1)
    sl = [i for i in sl if i!=""]
    
    for _ in range(int(input())):
        if any(map(lambda x : x in sl, input().split())) :
            print("VALID")
        else :
            print("INVALID")