Solution. Python program to verify that a string only contains letters, numbers, underscores and dashes. Python | Check if a variable is string Last Updated : 22 May, 2019 While working with different datatypes, we might come across a time, where we need to test the datatype for its nature. Quizzes HTML Quiz CSS Quiz JavaScript Quiz SQL Quiz PHP Quiz Python … Python in and not in operators work fine for lists, tuples, sets, and dicts (check keys). In this tutorial, we are going to write a program that checks whether a string contains any special character or not. Python all() method to check if the list exists in another list. You need to check for the occurrence of any of a set of characters in a string. Python Set Operations : In this tutorial, we will learn about different python set operations, some of them are as follows : Set Contains; Set Not Contains; Set Length; Set Deletion; Set Min & Max; Set Contains. In this tutorial you'll learn how to use Python's rich set of operators, functions, and methods for working with strings. Python