The instructions for the coding test are as follows:"

Votee would like to conduct the coding test in a recorded live session. The idea is to connect to an API that plays a Wordle-like puzzle. You can find the API documentation at the following link: https://wordle.votee.dev:8000/redoc

Developers are allowed to use any frameworks, IDEs, chatbots, LLMs, or other resources to write their program and showcase their skill set. However, if you take references from other open-source projects or tutorials, please ensure that proper credit is given. Plagiarism will not be tolerated, and it may affect the evaluation of your application.

Your task is to write a program that automatically guesses random words against the API, using the following command as an example: curl -v ‘https://wordle.votee.dev:8000/random?guess=theft&seed=1234'"
If I run curl -v ‘https://wordle.votee.dev:8000/random?guess=theft&seed=1234 in the terminal, the output:
StatusCode        : 200
StatusDescription : OK
Content           : [{"slot":0,"guess":"t","result":"correct"},{"slot":1,"guess":"h","result":"correct"},{"slot":2,"guess":"e","result":"correct"}, 
                    {"slot":3,"guess":"f","result":"correct"},{"slot":4,"guess":"t","result":...
RawContent        : HTTP/1.1 200 OK
                    Content-Length: 211
                    Content-Type: application/json
                    Date: Sun, 26 May 2024 08:27:33 GMT
                    Server: uvicorn

                    [{"slot":0,"guess":"t","result":"correct"},{"slot":1,"guess":"h","result":...
Forms             : {}
Headers           : {[Content-Length, 211], [Content-Type, application/json], [Date, Sun, 26 May 2024 08:27:33 GMT], [Server, uvicorn]}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 211

My code to guess the words automatically and calculate the mean guess number of 100 words: "import requests
import json

import requests
import json
import concurrent.futures

# Load the word list
with open("/content/gdrive/MyDrive/wordle_guesses.txt", 'r') as file:
    word_list = [line.strip() for line in file.readlines()]

# API base URL
base_url = 'https://wordle.votee.dev:8000/random'

def make_guess(guess, seed):
    response = requests.get(f"{base_url}?guess={guess}&seed={seed}")
    if response.status_code == 200:
        return (guess, response.json())
    else:
        print(f"Failed to make a guess for {guess}.")
        return (guess, None)

def filter_word_list(word_list, feedback):
    new_word_list = word_list[:]
    for feedback_item in feedback:
        slot = feedback_item['slot']
        guess = feedback_item['guess']
        result = feedback_item['result']

        if result == 'correct':
            new_word_list = [word for word in new_word_list if word[slot] == guess]
        elif result == 'present':
            new_word_list = [word for word in new_word_list if guess in word and word[slot] != guess]
        elif result == 'absent':
            new_word_list = [word for word in new_word_list if guess not in word]
    return new_word_list

def solve_puzzle(seed):
    attempts = 0
    current_word_list = word_list

    while attempts < 6:
        if not current_word_list:  # Check if the list is empty
            print("No more words left to guess. Exiting.")
            return None

        # Use thread pool executor to make multiple guesses at the same time
        with concurrent.futures.ThreadPoolExecutor() as executor:
            future_to_guess = {executor.submit(make_guess, word, seed): word for word in current_word_list[:10]}  # Limit to the first 10 words to avoid overwhelming the system

            for future in concurrent.futures.as_completed(future_to_guess):
                guess, feedback = future.result()

                if feedback:
                    print(f"Feedback for '{guess}': {json.dumps(feedback, indent=2)}")

                    if all(item['result'] == 'correct' for item in feedback):
                        print(f"Solved with guess: {guess}")
                        return attempts + 1

                    current_word_list = filter_word_list(current_word_list, feedback)
                    break

        attempts += 1

    print("Failed to solve the puzzle within 6 attempts.")
    return None

def test_all_seeds(seeds):
    total_guesses = 0
    for seed in seeds:
        print(f"Testing seed: {seed}")
        guesses = solve_puzzle(seed)
        if guesses is not None:
            total_guesses += guesses
        else:
            print(f"Could not solve puzzle for seed: {seed}")

    mean_guesses = total_guesses / len(seeds)
    print(f"Mean number of guesses: {mean_guesses}")

# Example usage with a list of seeds
seeds = list(range(5))  # This should be a list of seeds you want to test
test_all_seeds(seeds)"
Help me to make the loop faster, since it is too slow?