#Python question: How do I take input of two lists and whack them against each other? i.e load a list of urls then append each url with each file in list. Something like; in bash
-
-
Sure, I just wanted an alternative that didn't need an import. Was mostly having fun. I think the list comprehensions are the best though: urls=['http://foo.com ','https://t.co/csfiQxXPKm'] paths=['/baz','/quux'] print([i+j for i in urls for j in paths])
-
So if I wanted to load two files loading them into lists are the easiest then?
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.