J
Jon Perez
For a given list:
fruits=["apples","oranges","mangoes","bananas"]
Is it possible to do wildcard matches like shown below?
1. "man*" in fruits
2. fruits.index("man*")
3. "*nanas*" in fruits
4. fruits.index("*nanas")
or is there any way to achieve an equivalent effect
short of doing a while loop?
fruits=["apples","oranges","mangoes","bananas"]
Is it possible to do wildcard matches like shown below?
1. "man*" in fruits
2. fruits.index("man*")
3. "*nanas*" in fruits
4. fruits.index("*nanas")
or is there any way to achieve an equivalent effect
short of doing a while loop?