Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compare words Python
#1
Hi guys, I need to compare 2 words of a list.
If I have hello and jello it has to print correct, because is the same word or it only has one different word.
How can I do this? Thanks!
Reply
#2
What have you tried? Post your code in python tags, full traceback for any error - in error tags, sample input and desired output.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
(Jan-24-2019, 07:57 AM)buran Wrote: What have you tried? Post your code in python tags, full traceback for any error - in error tags, sample input and desired output.
The problem is that I don't know how to start. I know to compare if there are the same words, but I don't know how to compare if there is one different word
Reply
#4
(Jan-24-2019, 08:00 AM)xSphere Wrote: I know to compare if there are the same words

Then you have almost everything you need. Apply your knowledge (how to compare words) to letters in words. You just treat letter as word with length of one letter.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  python-docx regex : Browse the found words in turn from top to bottom Tmagpy 0 1,492 Jun-27-2022, 08:45 AM
Last Post: Tmagpy
  Compare two Excel sheets with Python and list diffenrences dmkfon 1 14,493 Oct-09-2021, 03:30 PM
Last Post: Larz60+
  Generate a string of words for multiple lists of words in txt files in order. AnicraftPlayz 2 2,759 Aug-11-2021, 03:45 PM
Last Post: jamesaarr
  how to compare two different size images in python and find corresponding pixel value squidsirymchenry 1 4,516 Feb-03-2020, 06:48 AM
Last Post: michael1789
  How to compare in python an input value with an hashed value in mysql table? Formationgrowthhacking 4 3,267 Jan-14-2020, 11:43 AM
Last Post: Formationgrowthhacking
  Compare two images with Python is possible? Delemir78 3 4,718 Dec-17-2019, 09:03 PM
Last Post: Larz60+
  Voynich search engine in python using dashes & dot totals to find Italian words Pleiades 3 3,441 Oct-10-2019, 10:04 PM
Last Post: Pleiades
  How can I compare Python XML-Files and add missing values from one to another kirat 2 2,628 Aug-30-2019, 12:17 PM
Last Post: perfringo
  Python csv compare two file, update value if two value is matched kinojom 1 2,518 Apr-17-2019, 10:36 AM
Last Post: DeaD_EyE
  Omit pronoun/common words when searching in Python fabkhush 1 2,507 Feb-19-2019, 09:12 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020