You are currently viewing 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]))

Screenshot of the output:

That’s it Folks on this topic. Let us know your comments on this article in the comment box below. Kindly like our facebook page, follows us on twitter and subscribe to our YouTube channel for latest updates.

Leave a Reply