[Solved] What can you use instead of zip?


It’s not clear why you’re using your own zip() instead of Python’s zip(), nor why you believe you need zip() at all. You can get this program to work by simplifying the code:

fun_string = """In ___0___, crazy ___1___ with ___2___, ate a meal called ___3___ on a grill"""
horror_string = """In ___0___ owned by ___1___, many were killed by ___2___ because of huanted ___3___"""
mystery_string = """The most mysterious place on Earth is ___0___, next to ___1___'s house because of a ___2___ living in ___3___"""

answers = []
blanks = ["___0___", "___1___", "___2___", "___3___"]

def select_level():

    user_input = raw_input("Type in a story you wish to play: ")

    while user_input not in ["Fun", "Horror", "Mystery"]:  
        user_input = raw_input("Invalid story. Please try again: ")

    if user_input == "Fun":
        quiz(fun_string, answers, blanks)
    elif user_input == "Horror":
        quiz(horror_string, answers, blanks)
    elif user_input == "Mystery":
        quiz(mystery_string, answers, blanks)  

def quiz(quiz_string, answers, blanks):
    print quiz_string

    for blank in blanks: 
        answer = raw_input("Type in a word: ")
        quiz_string = quiz_string.replace(blank, answer)
        answers.append(answer)

    print quiz_string

print """Welcome to kis ReMadlibs!!!!"""
print """Select a story you wish to particiate!!"""
print """Fun, Horror, Mystery"""

select_level()

solved What can you use instead of zip?