Re: [Tutor] Finding more efficient ways

2013-07-10 Thread Alan Gauld
On 09/07/13 21:04, HRK wrote: PROBLEM #1 heights = {"Mount Everest": 8848, "Mount Cook": 3754, "K2": 8611, "Ben Nevis": 1344, "Hekla": 1488} Since you already have a dict of heights why do you pass one in to the function each time? Why not just pass this one in? Or use it as a global? def

Re: [Tutor] Finding more efficient ways

2013-07-10 Thread Dave Angel
On 07/09/2013 04:04 PM, HRK wrote: Hello, I'm pretty new to Python so while I can make some basic stuff work, it doesn't look particularly pretty. I wanted to find better ways to solve the following two problems (the current code works, but is clunky.) Any tips or help appreciated. Thanks!