Element3 of each list is a list (in brackets). I want element3 to be a string 'store1.txt' not ['store1.txt'].
store_list = [["Freds", "store1"], ["Sams", "store2"], ["Johns", "store3"], ["Toms", "store4"]]
urls_list = ['store1.txt', 'store2.txt', 'store3.txt', 'store4.txt', 'store5.txt', 'store6.txt']
ls = []
for x in store_list:
str_num = x[1]
matching = [s for s in urls_list if str_num in s]
x.insert(3, matching)
ls.append(x)
for i in ls:
print i