Python3 - Sample Interview Question (Junior Level)

You need to map 2 lists of football teams

hfc = ["Arsenal", "Aston Villa"]

afc = ["West Bromwich Albion", "Tottenham Hotspur"]


to produce this output:

Arsenal vs. West Bromwich Albion

Aston Villa vs. Tottenham Hotspur


What would be the most "Pythonic" way to do it?


  1. for fa in range(0, len(hfc)):
    print hfc[fa] + " vs. " + afc[fb]
  2. for fa in hfc:
    print fa + " vs. " + afc[hfc.index(fa)]
  3. for a, b in zip(hfc, afc):
    print a + " vs. " + b
  4. None of the above
Tests in Python3 for Juniors

Test Name Difficulty Time (minutes) No. of Questions
Python3 Online Test for Juniors Python3 Junior 60 30

More Specific Tests in Python3 for Juniors

Test Name Difficulty Time (Minutes) No. of Questions
Python-Common-Mistakes Online Test for Juniors Python - Common Mistakes Junior 20 10
Python-Magic-Methods Online Test for Juniors Python - Magic Methods Junior 20 10