- To check if the substring exists ->
.find(sub_string)
||.find(sub_string, start_pos, end_pos)
Returns-1
if substring does not exists. - This method checks if all the characters of a string are alphanumeric (a-z, A-Z and 0-9). -> str.isalnum()
- Swap cases. Will swap cases in the string. ->
s.swapcase()
- Join the string back ->
string = ''.join(l)
l can be any iteratable DS like a list. - This method checks if all the characters of a string are digits (0-9)/alphabetical (a-z and A-Z). -> str.isdigit() || str.isalpha()
- This method checks if all the characters of a string are lowercase/uppercase characters -> str.islower() || **[str.isupper()](https://docs.python.org/2/library/stdtypes