If there are 4 lists
items = []
item_links = []
prices = []
images =[]
Is there a way to print these lists together? I mean, the first item of 1st list together with the first element of the third and fourth list. Thanks.
Use zip
for item, link, price, image in zip(items, item_links, prices, images):
print(item, link, price, image)
tried that..says, list index out of range, maybe the lists do not have equal elements
The iterator stops when the shortest input iterable is exhausted, not-equal length is ok.
Outputs nothing :(
@Abhishek Rai is any list empty?
@Shadowcoder, Damn!..One of them is..