Is there a way to check if a string contains special characters? [closed] April 12, 2024 by Tarik Check for any of characters not being alphanumeric like: any(not c.isalnum() for c in mystring)