[Python] How to check a string for specific characters?

Discussão em 'Python' iniciado por Stack, Março 14, 2025.

  1. Stack

    Stack Membro Participativo

    How can I check if a string has several specific characters in it using Python 2?

    For example, given the following string:


    The criminals stole $1,000,000 in jewels.
    ​

    How do I detect if it has dollar signs ($), commas (,), and numbers?

    Continue reading...

Compartilhe esta Página