can someone explain how the following dictionary definition is supposed to work?
Pycharm shows it as a syntaxial error, but the class I am taking shows it valid:
payload = {'email': 'password': 'badpass'}
Thank you
(Apr-24-2023, 06:26 PM)nafshar Wrote: [ -> ]can someone explain how the following dictionary definition is supposed to work?
Pycharm shows it as a syntaxial error, but the class I am taking shows it valid:
payload = {'email': 'password': 'badpass'}
Thank you
It appears this is an error after all. It was just reported in the on-line class as well. Sorry about the confusion and thank you for looking at it.
A dictionary work with key and values pair,so 3 item dos not work well.
>>> payload = {'email': 'some@thing', 'password': 'badpass'}
>>> payload = {'email': 'some@thing', 'password': 'badpass'}
>>> payload['email']
'some@thing'
>>> payload['password']
'badpass'