26 lines
504 B
Python
26 lines
504 B
Python
INPUT_FILE = "test.text"
|
|
|
|
|
|
def main():
|
|
with open(INPUT_FILE, 'r') as file:
|
|
data: list[str] = file.readlines()
|
|
|
|
for line in data:
|
|
record, groups = line.split()
|
|
|
|
groups: list[int] = [int(g) for g in groups.split(',')]
|
|
|
|
# for group in groups:
|
|
|
|
# # if '#' * group in record:
|
|
# # groups.remove(group)
|
|
# # record = record.replace('#' * group, '')
|
|
|
|
print(f'{record} {groups}')
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|