0

String follows the pattern or not???

This is a program that Check if string follows order of characters defined by a pattern or not For example: Input: ahhellllloou Output: YES Input: hlelo Output: NO 𝘽𝙪𝙩 𝙞𝙩 𝙙𝙤𝙚𝙨𝙣'𝙩 𝙬𝙤𝙧𝙠 𝙬𝙞𝙩𝙝 𝙩𝙝𝙚𝙨𝙚 𝙞𝙣𝙥𝙪𝙩𝙨...𝙒𝙃𝙔??? https://code.sololearn.com/cI5VI2rE1gqu/?ref=app

23rd Oct 2022, 4:00 PM
Amateur
1 ответ
+ 1
Sry, I don't understand your logic. But actually you can simply do this for same output : pat = "hello" talk = input() print(pat in talk) edit : is first case have pattern "hello" ? how yes?
23rd Oct 2022, 6:23 PM
Jayakrishna 🇮🇳