In this program, we will take a string as input and check whether the string is a subset of another string or not.
Steps to solve the program
- Take a string and a substring as input.
- Convert the input string to a set using set() and assign it to the string3 variable.
- Create a count variable and assign its value equal to 0.
- Use for loop to iterate over string3, if a character from string3 exists in the substring then add 1 to the count variable every time.
- If the value of count variable is equal to the length of the substring then print True else False.
Output :