My output:
I have CMShehbaz
CMShehbaz
Expected:
I have CMShehbaz CMShehbaz
I am trying get result in one line. I tried with end=""
, concat +
, but did not
work. I want result in one line.
lines = []
with open('user.txt') as f:
lines = f.readlines()
count = 0
for line in lines:
count += 1
print("I have {} {}".format(line,line) )
print(f'line {count}: {line}')