Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions archivator/arch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
def archivation(input):
res = ''
# TODO: add loop
# TODO: use structure for input
for index in input:
if input[index] == 'A':
res += 'A'

# if input[0] == 'A':
# if input[1] == 'A':
# if input[2] == 'A':
# if input[3] == 'A':
# res += 'A4'
# if input[4] == 'T':
# if input[5] == 'T':
# res += 'T2'

return res


result = archivation("AAAATTBBNOOOOS") # A4T2B2NO4S

print(result)