Learn practical skills, build real-world projects, and advance your career
Largest substring among elements in a list
Description
You are given a list of string elements. You have to find the largest substring that is common in any 
of the two string elements present in this list. You will print the two string elements which have the largest 
common substring along with the corresponding substring as the output.
import jovian
jovian.commit()
[jovian] Attempting to save notebook..
ls=["string","substring"]
for i in ls:
    ls[i].find(ls[i+1])
    
ls[0]
'string'
#"substring" in "string"
ls[0].find(ls[1])
-1