I am trying to append a hyperlink “http://data/CR/” to like below,for some reason its not getting appended..anyidea what is wrong here?
INFO = """
<tr>
<td><a href= \"http://data/CR/\" + "{CR}">{CR}</a></td>
<td>{FA}</td>
<td>{CL}</td>
<td>{Title}</td>
</tr>
"""
for item in CRlist[1:]:
CRstring += INFO.format(
CR=item[0],
FA=item[1],
CL=item[2],
Title=item[3],
)
I was working on your last attempt at a question when it got deleted. Assuming CRlist from your previous question item[0] is always empty so your URL will never get formed.
As for how you formatted your url you don’t need to escape your double quotes since you are in a multi-line string. You also don’t need the + or extra quoting around it. Just type it exactly like you want to see it.