You are viewing a single comment's thread. Return to all comments →
Python 3
import re pattern = r'^\d{5}\s(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)$' for _ in range(int(input())): print('VALID' if bool(re.match(pattern, input())) else "INVALID")
Seems like cookies are disabled on this browser, please enable them to open this website
HackerRank Language
You are viewing a single comment's thread. Return to all comments →
Python 3