Skip to content

Instantly share code, notes, and snippets.

@theTonyHo
Created November 21, 2014 05:46
Show Gist options
  • Save theTonyHo/39361f5c2ac74613563a to your computer and use it in GitHub Desktop.
Save theTonyHo/39361f5c2ac74613563a to your computer and use it in GitHub Desktop.
invalid_chars = "#$+"
invalidResponse = True
while invalidResponse:
response = rs.GetString()
if not response:
break
rc = str.strip(response, invalid_chars)
invalidResponse = (rc != response)
if invalidResponse:
print "Invalid Characters found"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment