We often have to find the common part of two sets of data. It can be when we are merging two data sets, or you sometimes see if a certain data or a certain part of data appears more times implying it is either more important or highly reliable and a lot more.
In this question, we will take up a simpler problem of the same type. You will be given two strings. Can you think of a way to find only the common prefix part in the two strings? Let's see as Sajan explains it.
The pseudocode of this problem may seem complex but if you follow it in the order Sajan explains it, you'll find it simple. Let's see how do we write it in Python.
You saw that Sajan made an error in the code and how was he able to debug it. You'll also face such issues while coding and keep developing the skill of debugging. Now, it's your turn to try the problem.