I have a package of python modules that I need to import to another module. Wi use of user input of a string or interger, the module is to iterate over the list of the modules to find the one with an answer as follows.

from hometests.clauses import * # imports all modules/functions
import re
import sys

GAMES = [ 'answer_neg1', answer_neg2', 'answer_neg3', 'answer_neg4', answer_neg5', 'answer_pos1', 'answer_pos2', answer_pos3', .....] #imported modules/functions

while true:
    if key in name:
       break
    elif:
       for key,func in GAMES:
           func()
    else:
        print( 'no game for that, please try again')# THE PROBLEM IS THAT IT ALWAYS PRINTS HERE AND NOT ITERATING OVER THE GAMES LIST

SAMPLE MODULE:

import sys
import re
import clause
name = input('Please enter your word here').lower()
name2 =name[:]
for item in name2:
    if item == clause:
        print(......
        code
This question has already been answered. Start a new discussion instead.