We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Awesome explanation! Thank you so much! I was wondering though -- what is the difference between using a dictionary vs. if-else? Is it faster? More accurate? Should I be using a dictionary whenever I can? What cases would this be a good solution for? A bad solution?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Python If-Else
You are viewing a single comment's thread. Return to all comments →
Awesome explanation! Thank you so much! I was wondering though -- what is the difference between using a dictionary vs. if-else? Is it faster? More accurate? Should I be using a dictionary whenever I can? What cases would this be a good solution for? A bad solution?