This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients AjaySyam, steven.daprano, terry.reedy, xtreak
Date 2019-08-31.01:17:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1567214262.93.0.388757551269.issue37988@roundup.psfhosted.org>
In-reply-to
Content
This code derived from the blurry image

lst = ['malaysian', 'malayalam', 'aaaaaaaaa']
ip = input('word ')
li = len(ip)
miss = 0
for word in lst:
    if len(word) == li:
        for j in range(li-1):  # skip last because of lookahead
            if word[j] != ip[j] and word[j+1] != ip[j]:
                 miss += 1
        if miss < li/2:
            print(word)

run with 3.8.0b4 on Win10 in IDLE prints the expected output.

word malayalam
malaysian
malayalam

I leave it to you to find out why you got something different and to play with variations. Please direct any questions to python-list or similar forums, as they will almost certainly be off-topic here.  And do follow the advice about question format and providing code as text.

Steven, the code ran without error in PyCharm, but gave no matches.  I presume that the 'error' was not matching 'malaysian' even though the miss count 4 is less than 4.5.  I must have corrected something when reading the blurs and polishing the code.
History
Date User Action Args
2019-08-31 01:17:43terry.reedysetrecipients: + terry.reedy, steven.daprano, xtreak, AjaySyam
2019-08-31 01:17:42terry.reedysetmessageid: <1567214262.93.0.388757551269.issue37988@roundup.psfhosted.org>
2019-08-31 01:17:42terry.reedylinkissue37988 messages
2019-08-31 01:17:42terry.reedycreate