I have a file that has multiple urls and list with url paths. I am trying to concatenate or join them together with the url paths in the list. I am having a lot of trouble trying to get this to work.
file has urls like this
foobar.com
foobar.com.tk
foobar.org
list1 = ['/foobar.php','/foobar.html','/foobar.php']
with open('file1.txt') as f:
Nlist = [line.strip() for line in f]
I don't know if it matters or not but the file with urls doesn't have the http:// header and when I try to join the urls from the list with the paths I keep getting an error or the code is all bunched up...How do I join the urls from the file with the paths from the list?
list_a + list_b, regardless of where their data comes from.lines = list(open(filename, 'r'))