Python Forum
checking a string for two instances of .. - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: checking a string for two instances of .. (/thread-26770.html)



checking a string for two instances of .. - Skaperen - May-13-2020

i get a string foo that will be a problem if there are two or more instances of the particular characters in another string bar. so if bar has 'apz' then foo must not have more than one 'a' and not more than one 'p' and not more than one 'z'/ i'm looking for a small nifty easy to read way to check foo for this.


RE: checking a string for two instances of .. - ndc85430 - May-13-2020

What have you tried?


RE: checking a string for two instances of .. - Skaperen - May-13-2020

i have not tried anything but planning. this is an anticipated need.