Check Tutorial tab to know how to to solve.  

You are given a string $\boldsymbol{s}$ consisting only of digits 0-9, commas ,, and dots .

Your task is to complete the regex_pattern defined below, which will be used to re.split() all of the , and . symbols in $\boldsymbol{s}$.

It’s guaranteed that every comma and every dot in $\boldsymbol{s}$ is preceeded and followed by a digit.

Sample Input 0
100,000,000.000

Sample Output 0
100
000
000
000

Difficulty: EASY

Starter code:

Solutions:
import re
for s in re.split('[,\\.]', input().strip()):
	if s:
		print(s)


import re
a = re.split('[,.]', input())
print('\n'.join(filter(None, a)))


import re
for e in re.split('[.,]', str(input())):
	if e != '':
		print(e)


import re
reg = ',|\\.'
s = input().strip()
for i in re.split(reg, s):
	if i:
		print(i)


s = input()
l = ''
for i in s:
	if i == ',' or i == '.':
		l += ' '
	else:
		l += i
l = ' '.join(l.split())
l = l.split(' ')
for i in l:
	print(i)


import re
s = input()
for t in re.split(',|\\.', s):
	if t != '':
		print(t)


import re
for s in re.split('[.,]', input()):
	if s:
		print(s)


import re
n = input()
a = re.split('\\.', n)
for i in a:
	for j in re.split(',', i):
		if j:
			print(j)


import re
a = input()
b = re.split('[.,]', a)
print('\n'.join((i for i in b if len(i) > 0)))


import re
print(*[str(r) + '\n' if r else '' for r in re.split(',|\\.', input())], sep='')


import re
print('\n'.join((s for s in re.split('[,.]', input()) if s)))


import re
print('\n'.join([x for x in re.split(',|\\.', input()) if x]))


import re
for x in re.split('[,.]+', input().strip()):
	if len(x) != 0:
		print(x)


import re
import sys
S = sys.stdin.readline().strip()
print(*(x for x in re.split('[,\\.]', S) if x), sep='\n')


import re
S = input()
sp = re.split('[\\.,]', S)
for each in range(len(sp)):
	if sp[each] != '':
		print(sp[each])


import re
s = input()
s = re.split('[\\,\\.]', s)
s = filter(None, s)
print(*s, sep='\n')


import re
print(*list(filter(lambda s: len(s) > 0, re.split('\\.|,', input()))), sep='\n')


import re

def __starting_point():
	out = list(re.split('[.,]', input()))
	print('\n'.join(filter(lambda x: re.match('[0-9]+', x), out)))
__starting_point()


import re
for line in re.split('[,.]', input().strip()):
	if len(line) > 0:
		print(line)


import re
no = input()
str1 = re.split(',|\\.', no)
for i in str1:
	if i:
		print(i)


import re
l = re.split('[\\,\\.]+', input())
for i in l:
	if not i == '':
		print(i)


import re
for e in re.split('[,.]+', input()):
	if e != '':
		print(e)


import re
for e in re.split(',|\\.', input()):
	if e:
		print(e)


import re
my_string = input().strip()
for i in re.split('[^0-9]', my_string):
	if i != '':
		print(i)


print(*filter(None, __import__('re').split('[,.]', input())), sep='\n')


import re
for value in re.split('[,\\.]', input()):
	if value.strip() != '':
		print(value)


import re
mm = input()
mm = mm.replace(',', '.')
ff = re.split(',', mm)
for i in ff:
	aa = re.split('\\.', i)
	for j in aa:
		if j != '':
			print(j)


import re
sol = re.split('[,.]', input())
for x in sol:
	if x:
		print(x)


import re
for s in re.split('[,.]', input()):
	if s:
		print(s)


import re
theInput = input()
strings = re.split('[.,]', theInput)
print('\n'.join([x for x in strings if x]))


import re
print('\n'.join(re.split('[,.]+', input())).strip())


import re
print('\n'.join((x for x in re.split('[,\\.]+', input().lstrip('.').lstrip(',')))))


import re
s = input()
for g in re.split('[.,]', s):
	if g:
		print(g)


import re
[print(s) for s in re.split('[,.]', input()) if s != '']


import re
for val in re.split('[,.]', input()):
	if val:
		print(val)


import re
s = re.split('[,]+|[\\.]+', input())
for word in s:
	if len(word) > 0:
		print(word)


import re
print('\n'.join((i for i in re.split('[\\,\\.]', input()) if len(i) > 0)))


import re
print('\n'.join(filter(len, re.split('[,\\.]', input().strip()))))


import re
m = re.split('[,.]+', input().strip())
for i in m:
	if len(i) > 0:
		print(i)


import re
print('\n'.join((i for i in re.split('[.,]+', input()))).strip())


import re
l = re.split('[,.]+', input())
for n in l:
	if len(n) > 0:
		print(n)


import re
n = input()
s = re.split('[,.]', n)
for i in range(len(s)):
	if s[i] != '':
		print(s[i])


def sp(ls):
	val = '0123456789'
	xs = list(ls)
	nb = len(xs)
	test = xs[0] in val
	(i, end) = (0, nb - 1)
	while i < nb:
		while test and i < nb:
			test = xs[i] in val
			if test:
				print(xs[i], sep='', end='')
				i += 1
		if i != 0 and i <= end:
			print()
		while not test and i < nb:
			test = xs[i] in val
			if not test:
				i += 1
sp(input().strip())


import re
ret = re.split('[,\\.]', input())
for r in ret:
	if r != '':
		print(r)


import re
s = re.split('[,.]', input())
for i in s:
	if i != '':
		print(i)


import re
[print(x) for x in re.split('[,.]', input()) if len(x) > 0]


import re
print('\n'.join([x for x in re.split('[,\\.]', input()) if x]))


import re
s = input()
ans = re.split('[,.]', s)
for item in ans:
	if len(item) > 0:
		print(item)


import re
print('\n'.join(filter(None, re.split('[,\\.]+', input().strip()))))


import re
N = input()
print('\n'.join(list(filter(None, re.split('[.,]', N)))))


import re
print(*filter(lambda x: len(x) > 0, re.split('[,.]', input())), sep='\n')


import sys, re
string = str(input().strip())
string_list = re.split('[\\.\\,]', string)
string_list = [re.sub('\\D', '', s) for s in string_list if len(s) > 0]
for s in string_list:
	print(s)


import re
print(*[i for i in re.split('[,.]+', input()) if len(i) > 0], sep='\n')


import re
print('\n'.join((i for i in re.split('[,.]', input()) if len(i) > 0)))


import re
s = input()
s = re.split('[,.]', s)
for i in s:
	if len(i):
		print(i)


import re
print(*[x for x in re.split('\\.|,', input()) if x not in ' '], sep='\n')


import re
s = str(input())
l = re.split('[,.]', s)
for i in range(len(l)):
	if l[i] == '':
		continue
	else:
		print(l[i])


import re
S = input()
for x in re.split('[\\,\\.]', S):
	if x:
		print(x)


import re
import sys

def re_split():
	s = sys.stdin.readline()
	s = s.strip()
	res = re.split('\\.|,', s)
	for num in res:
		if num:
			sys.stdout.write(num + '\n')
	return

def main():
	re_split()
	return
main()


import re
inp = input()
for elem in re.split('[,\\.]', inp):
	if elem:
		print(elem)


import re
p = re.compile(',|\\.')
l = p.split(input())
for s in l:
	if len(s) > 0:
		print(s)


import re
getal = re.split('[\\.\\,]+', input())
for i in range(len(getal)):
	if len(getal[i]) > 0:
		print(getal[i])


import re
S = input()
tempList = re.split('\\.|,', S)
for number in tempList:
	if number:
		print(number)


import re
s = input()
for itm in [x for x in re.split('[,.]', s) if x != '']:
	print(itm)


import re
reg = re.compile('[.,]')
for line in reg.split(input()):
	if line == '':
		continue
	print(line)


import re

def main():
	s = input()
	print('\n'.join([x for x in re.split('[,\\.]', s) if x]))
main()


import re
print(*(s for s in re.split('[,.]', input().strip()) if s), sep='\n')


import re
print('\n'.join(filter(lambda x: len(x) > 0, re.split('[,\\.]+', input()))))


import re
for i in re.split('[.,]', input()):
	if len(i) > 0:
		print(i)


import re
from functools import reduce

def append(l1, l2):
	return l1 + l2

def empty(s):
	return s != ''
S = input()
dot = re.compile('\\.')
prime = re.compile('\\,')
L1 = re.split(dot, S)
L = reduce(append, [re.split(prime, element) for element in L1])
for element in list(filter(empty, L)):
	print(element)


import re
for k in re.split('[.,]', input().strip()):
	if len(k) > 0:
		print(k)


import re
for numbers in re.split('[.,]+', input()):
	if len(numbers) > 0:
		print(numbers)


import re
split_str = '[,.]'
num_regex = '\\d+'
num = input()
for s in re.split(split_str, num):
	if re.match(num_regex, s):
		print(s)


import re
A = re.split('[,\\.]+', input())
for i in A:
	if i.isdigit():
		print(i)


import re
string = input()
strList = re.split('[,.]+', string)
for word in strList:
	if len(word) == 0:
		continue
	print(word)