We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 800edf5 + 6bf8fe6 commit c0dc4e3Copy full SHA for c0dc4e3
RegexandParsing/Resplit.py
@@ -4,6 +4,11 @@
4
Domain : Python
5
Author : Ahmedur Rahman Shovon
6
Created : 15 July 2016
7
+Updated : 3 April 2021
8
Problem : https://www.hackerrank.com/challenges/re-split/problem
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