attempt-1

This commit is contained in:
Zofia Bączyk 2020-11-08 20:35:19 +01:00
parent 2316c1e4a7
commit 4ce9ce83bd
2 changed files with 26 additions and 0 deletions

0
TaskA04/Makefile Normal file
View File

26
TaskA04/run Normal file
View File

@ -0,0 +1,26 @@
#!/usr/bin/python3
import sys
def num(x):
if x >= '0' and x <= '9':
return True
else:
return False
def numbers(x):
temp = ''
array = []
for i in x:
if num(i):
temp = temp + i
else:
if temp != '':
array.append(temp)
temp = ''
return array
for line in sys.stdin:
temp = numbers(line)
if len(temp) != 0:
print(' '.join(temp))