I have been making a simple Hangman game in python. I want a block of code that can determine if the guess of the user (the input) is missing one letter or is different by one letter only from the original word.
For example, let's say the word the user has to guess is "apple". If the user wrote "apple" the game will show "You've guessed the word!" if the user entered a completely different word like "orange" the game will display "Wrong! Try again". So far I have been able to make all of this except the part where if the user typed a word like "aple" or "aPble" or "appl" I want the game to display "CLOSE!".
Please note I am 100% new to python programming as well as stack overflow so if I somehow messed up explaining the problem please excuse me :)