Q. Suggest appropriate functions for the following tasks:


(i) To check whether the string contains digits

(ii) To find for the occurrence a string within another string

(iii) To convert the first letter of a string to upper case

(iv) To capitalize all the letters of the string

(v) To check whether all letters of the string are in capital letters

(vi) To remove from right of a string all string- combinations from a given set of letters

(vii) To remove all white spaces from the beginning of a string


Answer =

(i) .isdigit()
(ii) .find(sub)
(iii) .capitlize()
(iv) .upper()
(v) .isupper()
(vi) .rstrip()
(vii) .lstrip()

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post