Task A47
This commit is contained in:
parent
a9caf01342
commit
90db18cf5e
@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
python TaskA29/run.py "$@"
|
||||
python TaskA37/run.py "$@"
|
||||
|
2
TaskA47/run
Normal file
2
TaskA47/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
python TaskA47/run.py "$@"
|
17
TaskA47/run.py
Normal file
17
TaskA47/run.py
Normal file
@ -0,0 +1,17 @@
|
||||
import sys
|
||||
import re
|
||||
|
||||
regex = re.compile('(#[A-Za-z][A-Za-z0-9]*)')
|
||||
|
||||
for line in sys.stdin:
|
||||
hashtags = list(regex.findall(line.replace('\n', '')))
|
||||
if hashtags:
|
||||
answer = ''
|
||||
for i, tag in enumerate(hashtags):
|
||||
if i == 0:
|
||||
answer += tag
|
||||
else:
|
||||
answer += ';' + tag
|
||||
print(answer)
|
||||
else:
|
||||
print('<NONE>')
|
Loading…
Reference in New Issue
Block a user