Skip to content

Commit 6bf8fe6

Browse files
Update Resplit.py
Working solution added. Previous solution failed all test cases.
1 parent 2a3b561 commit 6bf8fe6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

RegexandParsing/Resplit.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
Domain : Python
55
Author : Ahmedur Rahman Shovon
66
Created : 15 July 2016
7+
Updated : 3 April 2021
78
Problem : https://www.hackerrank.com/challenges/re-split/problem
89
'''
9-
import re;[print(i) for i in re.split("[,\.]?",input().strip()) if i]
10+
11+
import re
12+
regex_pattern = r'[.,]+'
13+
14+
print("\n".join(re.split(regex_pattern, input())))

0 commit comments

Comments
 (0)