2 Answers
+ 2
Check these codes.
any & all will help you
https://code.sololearn.com/cqQ1S4j9KN8Z/?ref=app
https://code.sololearn.com/cd326uP9ld2U/?ref=app
https://code.sololearn.com/cNgwc391osIs/?ref=app
+ 1
We can not share a code with you, unless you have done a try by yourself and posted it here. Thanks.
But we can give you some hints according your quetsion.
You could use:
- regular expressions
- a loop to iterate over the given string and compare each character if it matches to a given character set
- ...