labels = ['main', 'start', 'exit']
# Get the user's input
user_input = input('Enter a label: ')
# Find the closest match to the user's input
distances = [len(label) - sum([1 for i, j in zip(label, user_input) if i == j]) for label in labels]
min_distance = min(distances)
closest_match = labels[distances.index(min_distance)]
# If the closest match is within a certain threshold, suggest it to the user
if min_distance <= 2:
suggestion = input(f'Did you mean "{closest_match}" instead? (y/n)')
if suggestion.lower() == 'y':
user_input = closest_match
# Use the user's input for further processing
print(f'Processing label "{user_input}"...')