I realize this is a fairly generic type of question, but being new to programming, I&#39;m not sure how best to approach it.<div><br></div><div>I&#39;m doing a tutorial and was given a problem, using shelve.  It&#39;s taking a user name and then asking for scores in a game, until you end the loop.  Whatever score is the high score, should be returned from the function:</div>
<div><br></div><div>Here is what I have so far:</div><div><br></div><div>import shelve</div><div><br></div><div>def user_scores():<br></div><div>  user_name = input (&quot;What is the user name?&quot;).rstrip()</div><div>
  scores = int(input(&quot;What is the users score, enter 0 if done&quot;))</div><div>  shelf = shelve.open(&#39;scores.py&#39;, writeback=True)</div><div>  score = [scores]</div><div>  user = {user_name:score}</div><div>
  shelf[&#39;user&#39;] = user</div><div>  shelf.close()</div><div>  while scores &gt; 0:</div><div>    scores = int (input(&quot;What is the next score&quot;))</div><div>    shelf = shelve.open(&#39;scores.py&#39;, writeback=True)</div>
<div>    score.append(scores)</div><div>    shelf[&#39;score&#39;] = score</div><div>    shelf.sync()</div><div>    shelf.close()</div><div><br></div><div>What I&#39;m not sure of is how to compare the values of score, to find and print the one that is highest.  Any suggestions?  </div>
<div><br></div><div>Becky </div><div>    </div><div><br></div>