Answer the question
In order to leave comments, you need to log in
Why does concatenation wrap part of the string?
with open('img.log', 'r') as f:
contents = f.readlines()
for line in contents:
img = line[45:]
print(img + '.png')
1
.png
2
.png
3
.png
1.png
2.png
3.png
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question