May-19-2020, 03:03 PM
Hello everyone!
I couldn't understand why it didn't write y. How can i fix this ---> <zip object at 0x0139F608> ?
Here is my code:
I couldn't understand why it didn't write y. How can i fix this ---> <zip object at 0x0139F608> ?
Here is my code:
rbooks = [] nratings = [] books = list(a) for i in range(13): c = random.choice(books) print(c) rbooks.append(c) m = input("rate: ") nratings.append(m) print(rbooks) print(nratings) y = zip(rbooks,nratings) print(y)
Output:['Elizabeth Laird,Kiss the Dust\n', 'Elizabeth Laird,Kiss the Dust\n', 'Guy Gavriel Kay,The Summer Tree\n', 'Dan Brown,The Da Vinci Code\n', 'H G Wells,The War Of The Worlds\n', 'Lurlene McDaniel,Breathless\n', 'Patricia C. Wrede,Dealing with Dragons\n', 'Suzanne Collins,The Hunger Games\n', 'C S Lewis,The Lion the Witch and the Wardrobe\n', 'Meg Cabot,The Princess Diaries\n', "Douglas Adams,The Hitchhiker's Guide To The Galaxy\n", 'Meg Cabot,The Princess Diaries\n', 'Maya Angelou,I Know Why the Caged Bird Sings\n']
['5', '5', '5', '5', '5', '5', '5', '5', '5', '5', '5', '5', '5']
<zip object at 0x0139F608>