Find and shows the highest record of the name list
<p>I'm new to Python.
I've been given a task to write a Python program to read a name list which consist of people names and their height.</p>

<p>Any suggestion or idea for coding to find out the highest height and show the record?</p>

<p>For examples, the highest height is 180 and the result will show "Adam,180"</p>

<p>if you have separate lists:</p>

<pre><code>names  =  ['alireza','sarah','maryam','muhammad']
heights = [180,172,178,182]
print(names[heights.index(max(heights))])
</code></pre>

<p>if you want use dictionary:</p>

<pre><code>names = {'alireza':180,'sarah':172,'maryam':178,'muhammad':182}

max(names.keys(), key=names.get)
</code></pre>

<p>and if you want use 2d lists:</p>

<pre><code>names = [['alireza',180],['sarah',172],['maryam',178],['muhammad',182]]
heights = list(zip(*names))[1]
print(names[heights.index(max(heights))][0])
</code></pre>

python