Skip to content
Advertisement

How to concatenate an int with a string in Python?

I wanted to concatenate the i of the for loop with xpath but it gives me this error “TypeError: can only concatenate str (not “int”) to str”. How could I fix this problem?

JavaScript

Advertisement

Answer

use "tr"+str(i)+"/td

Advertisement