You are currently viewing How to Take-Two Input from the user and find the common character in Python?

How to Take-Two Input from the user and find the common character in Python?

In this article, we will take 2 inputs from the user and find the common character in both the string. This is another article in the series of Python Practice Programs on String Operation.

firstString = input("ener a string: ")
secondString = input("enter second string: ")

for i in range(len(firstString)):
    if firstString[i] in secondString:
        print(set(firstString[i]))

Leave a Reply