I have run into a problem joining two strings in Python.
I have some code that is like this:
for line in sites:
site = line
for line in files:
url = site+line
That should be easy I thougth but the strings ends up “looking wierd”:
http://example.com/ (this is the site)
history.txt (Then the line comes on another “line” in the strings which screws it up when I try to open the url because it is invalid)
Anyone knows a solution?
The simplest thing is to avoid using the same variable in the for statements:
Does that clear things up? It is good practice in any case.