I have tried adding (end = "") at the end of my print statements, but the values keep printing on a new line
for line in file:
errorDict[line] = errorDict.get(line, 0) + 1
for i, n in errorDict.items():
print (str(i) + str(":") + str(n))
It currently looks like this
5262200
:2
5DAA200
:1
531G200
:3
5700H3H
:1
5300A52
:2
I would like it to look like
5262200 : 2
5DAA200 : 1
531G200 : 3
5700H3H : 1
5300A52 : 2