Tag: Dictionaries

Stop Using dict key to Access Values in Python Dictionaries!

We probably learnt to use dict[key] to access a value in a dictionary at the start. But here’s a better way to do that. The original dict[key] method d = {'apple':4, 'orange':5, 'pear':6} x = d['apple'] # 4 y = d['orange'] # 5 ...

Creating A Script To Generate A List Of Dictionaries

Welcome Back To Another Learning Adventure! Today My Project Is On The Smaller Side. I Will Be Navigating How I Would Create A Python Script That Generates A List Of Dictionaries About Files That Are In My Dictionaries. I’ll Be Using One Of My Favorite AWS Services Cloud 9, & Then Pu...