Question: Help me solve this python code without re or anything advanced. Beginner python code. Nothing too long either. Thank you! please! I need
Help me solve this python code without re or anything advanced. Beginner python code. Nothing too long either. Thank you! please! I need to write a code that finds the common word which is windows.
for example:
Windows
Windows
Output:
Original strings:
Windows
Windows
Common values of given strings:
Windows
Here is my code but I keep getting the "output set:
def findcommoncharactersstr str:
str strlower
str strlower
strwords strsplit
strwords strsplit
common setstrwords & setstrwords
return common
str "Windows
str "Windows
result findcommoncharactersstr str
printCommon Words:", result
the output it keeps providing is this
Common Words: set
I need the output to say "windows"
since the common word is windows
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
