* Book order number: 10379 * Book build date: 2020-09-23-alpha * Book format (PDF, Epub or Mobi): PDF * Chapter: 2 * Section: 2.7 ## Description Hello! I was doing the web scraping project in PyCharm and it suggested using a dictionary literal for Lines 27-33. So, instead of: ```for info in zip(titles,prices, tags, total_platforms): resp = {} resp['title'] = info[0] resp['price'] = info[1] resp['tags'] = info[2] resp['platforms'] = info[3] output.append(resp) ``` ## Possible Solutions PyCharm suggested writing it as: ``` for info in zip(titles, prices, tags, total_platforms): resp = {'title': info[0], 'price': info[1], 'tags': info[2], 'platforms': info[3]} output.append(resp) ``` I think this would be good to include since list comprehensions are presented in this chapter too. ## Your full name so I can provide accurate credit within the book Gracie Devine
Activity
ivangeorgiev commentedon Dec 29, 2021
I have a bit different suggestion about this:
Another approach would be to use custom JSON serializer. Illustrated on
dataclassinstead ofnamedtuple:feexie commentedon Dec 4, 2023
cant understand the div class; i try to find the popular release but i couldn't find it! any help or suggestion please?
feexie commentedon Feb 28, 2024