Re.split()
-
Practice>Python>Regex and Parsing>Re.split()hackerrank.com 2019. 3. 29. 12:53
hackerrank.com Re.split() Problem Link : https://www.hackerrank.com/challenges/re-split/problem Difficulty : Easy Tip Regular expression is a key for handling string [,.]+ characters inside '[]' they can be repeated from 0 to mutiple times Solution regex_pattern = r"[,.]+"# Do not delete 'r'. import re print("\n".join(re.split(regex_pattern, input())))