Ad
  • Custom User Avatar

    try enumerating:

    for i, language in enumerate(langlist):
      print(greetlist[i])
    

    anyway, it would be better that you generate a dictionary like {'language' : 'greet'}, so you can call the language and get the greet directly

  • Custom User Avatar
    • You're using .index() without any argument - that's an error.
    • You're ignoring the argument of the function - language.
    • You are always returning something in the first iteration of the loop, so this won't work. You don't really need a loop here at all.