attempt-1
This commit is contained in:
parent
2316c1e4a7
commit
4ce9ce83bd
0
TaskA04/Makefile
Normal file
0
TaskA04/Makefile
Normal file
26
TaskA04/run
Normal file
26
TaskA04/run
Normal 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))
|
Loading…
Reference in New Issue
Block a user