I want to extract an index of just one item from the list
def main():
mylist = [21, 5, 8, 52, 21, 87]
num = input("What number: ")
if num in mylist:
print(mylist.index(int(num)))
I tried this but it doesn't output like it should, it prints nothing.