79671779

Date: 2025-06-19 08:45:36
Score: 2
Natty:
Report link

Is this what you want?

s1 = "Error: File foo has 5 unsolved dependencies and 4 errors."
s2 = "Error: File bar has 123 unsolved dependencies."
s3 = "Error: File baz has 45 unsolved dependencies and 3 warnings."

ending = ''
if s1[-1] == s2[-1] == s3[-1]:
    ending = s1[-1]
    s1 = s1[:-1]
    s2 = s2[:-1]
    s3 = s3[:-1]
result = []
for a,b,c in zip(s1.split(' '), s2.split(' '), s3.split(' ')):
    if a == b == c:
        result.append(a)
    else:
        result.append('*')

print(' '.join(result) + ('*' if not (len(s1) == len(s2) == len(s3)) else '') + ending)

It shows:

Error: File * has * unsolved dependencies*.
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): Is this
  • Low reputation (0.5):
Posted by: vassiliev