Find all the strings that are substrings to the given list of strings #shorts

preview_player
Показать описание
Here we give the python code to find the strings that are substrings to the given list of strings.
code:

"""
Find all the strings that are substrings
to the given list of strings
"""
test_list = ["Python", "Programming", "for"]
substring_to_check = ["Program", "or"]
matched_substring = []

for sub1 in test_list:
for ele1 in substring_to_check:
if ele1 in sub1:

print("Substring matched :", str(matched_substring))

If you found the video valuable, please leave a like and subscribe ❤️ It helps the channel grow and helps me pumping out more such content.

#Shorts
#python3​​ #programming​ #programmintips​ #pythontips​ #codingtips​ #coding​
Рекомендации по теме