-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
- 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:
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:
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
Metadata
Metadata
Assignees
Labels
No labels