Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String Comparing
#7
"deanhystad Wrote:Do you have an algorithm for doing this? What does it mean to be a "common letter"? What does it mean to be a "unique letter"? If I you write two words on a page how would you determine if the first letter in the first word is common or unique? Once you have the algorithm figured out it should be simple to translate that to Python.

@deanhystad, I think this is a valid question. Here is what I think the original poster is meaning to do when comparing the common and unique letters in each string.

string_1 = "Some String"
string_2 = "Something Stringy"
string_3 = "String Cheese"
In my opinion, they are either comparing vowels to consonants or they are comparing and contrasting each letter in each string to see how many times they are referenced. That way they find the most common and least commonly referenced letters in the string.

In this example we have the following letters: E, I, O, Y (Vowels) S, M, T, H, R, N, G (Consonants)

The program would then count the index values and compare it against other string values. I would write the code example if I could but I am not yet that good, still learning :)
Reply


Messages In This Thread
String Comparing - by Harshil - Aug-02-2020, 12:49 PM
RE: String Comparing - by Yoriz - Aug-02-2020, 01:01 PM
RE: String Comparing - by ibreeden - Aug-02-2020, 01:20 PM
RE: String Comparing - by Harshil - Aug-03-2020, 04:06 PM
RE: String Comparing - by ibreeden - Aug-04-2020, 05:47 PM
RE: String Comparing - by deanhystad - Aug-04-2020, 05:55 PM
RE: String Comparing - by Donovan - Aug-05-2020, 12:44 AM
RE: String Comparing - by Harshil - Aug-05-2020, 12:50 PM
RE: String Comparing - by buran - Aug-05-2020, 12:56 PM
RE: String Comparing - by Harshil - Aug-05-2020, 12:59 PM
RE: String Comparing - by deanhystad - Aug-05-2020, 02:14 PM
RE: String Comparing - by Harshil - Aug-05-2020, 05:09 PM
RE: String Comparing - by deanhystad - Aug-05-2020, 05:25 PM
RE: String Comparing - by Harshil - Aug-05-2020, 05:37 PM
RE: String Comparing - by deanhystad - Aug-05-2020, 05:49 PM
RE: String Comparing - by Harshil - Aug-05-2020, 05:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Comparing Dataframe to String? RockBlok 2 580 Nov-24-2023, 04:55 PM
Last Post: RockBlok
  Create a new list by comparing values in a list and string DBS 2 3,664 Jan-14-2017, 07:59 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

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