diff --git a/two_lists.py b/two_lists.py index bbb37ec..52f280a 100644 --- a/two_lists.py +++ b/two_lists.py @@ -5,6 +5,5 @@ species = ["mouse", "horse", "bee", "owl", "rabbit"] # Find the species for gene 'foo' -for gene, spec in zip(genes, species): - if gene == 'foo': - print(spec) +pos = genes.index('foo') +print(species[pos])