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.
  • Custom User Avatar

    So I'm trying to use the inputs to grab the index from one of the lists, then use the index to grab the string from the other list. I think it's failing to look for the input in list 1 which is why I'm not getting any indexes. I wrote:

       for language in langlist:
          i = langlist.index()
    

    then later:

       return greetlist[i]
    

    Does anyone know what I might be doing wrong?

  • Custom User Avatar

    "Hear me out... technically all countries are surrounding"