I'm making this guessing game to have the user guess a random word from a list. I'm confused about how to create if statements where the user's input is greater than or less than the index of the randomly selected word from the fruit list.
import random
fruit = ["blueberry", "grape", "apple", "mango", "watermellon"]
fruits = random.choice(fruit)
guess = input("Guess a fruit: blueberry, grape, apple, mango, or watermellon: \n")
while guess != fruits:
if guess < fruits.index:
print("-You've guessed low, try again")
elif guess > fruits.index:
print("-You've guessed high, try again")
elif guess == fruits:
print("You guessed the right number!")