Checking a string for punctuation using loops : <p>How do you check if a string has punctuation by using a loop. I was told to use the in operator </p>

<pre><code>string = input("Enter a string")

for char in string:
    if char in "'.,;:?!":
        print("that string contains  punctuation")
        break 
    else:
        print("that string contains punctuation")
        break
</code></pre>
