I am trying to concatenate string + variable + string picks up the variable from the file using Python
with open("file.txt") as fh:
for line line in fh:
d = "c:/" + xyz + ">"
print d
it prints c:/xyz > I wanted the output as "c:/xyz>". When i am trying in interactive mode it prints it fine.
It's hard to understand the question because of the weird formatting, but in any case try using the format
method:
d = "c:/{}>".format(xyz.strip('\n'))