Python string provides some very useful in built function, refer below snippet for implementing these in your code.Refer code for following questions.
Similar Articles