This commit is contained in:
Stephan Porada 2021-10-31 00:04:40 +02:00
parent 0efa8136a2
commit 7fa280187b
2 changed files with 1249 additions and 0 deletions

29
2/counter.py Normal file
View File

@ -0,0 +1,29 @@
from collections import Counter
from utils.Url import Url
def count_string():
with open('string.txt') as file:
string = file.read()
return Counter(string)
def get_lowest(counted_dict):
lowest_string = ''
for key in counted_dict:
if counted_dict[key] == 1:
lowest_string += key
return lowest_string
def main():
counted = count_string()
lowest_string = get_lowest(counted)
builder = Url()
builder.solution = lowest_string
print(builder.url)
if __name__ == '__main__':
main()

1220
2/string.txt Normal file

File diff suppressed because it is too large Load Diff