This commit is contained in:
Eryk Miszczuk 2019-11-05 11:59:16 +01:00
parent a9caf01342
commit 90db18cf5e
3 changed files with 20 additions and 1 deletions

View File

@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
python TaskA29/run.py "$@" python TaskA37/run.py "$@"

2
TaskA47/run Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
python TaskA47/run.py "$@"

17
TaskA47/run.py Normal file
View 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>')