Posts: 4,647
Threads: 1,494
Joined: Sep 2016
i wrote a function to find if any character in string one is in string two. is there anything in Python to do this without that character loop or even better, without making a function?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
perhaps sets makes the logic work better. but i get strings as my data source. how do you suggest that i use sets?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
(Aug-26-2024, 02:50 PM)jefsummers Wrote: OP - Back to your original question, are you wanting to know IF there are duplicate characters (yes/no which is well answered here) or WHAT characters are duplicated?
i want to know IF ... if i recall the project, now.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.