Which string method is used to implement the following:

1. To count the number of characters in the string.

2. To change the first character of the string in capital letter.

3. To check whether given character is letter or a number.

4. To change lowercase to uppercase letter.

5. Change one character into another character.

6 views

2 Answers

1. len(str)

2. str.capitalize()

3. ch.isalnum()

4. str.upper()

5. str.replace(old,new)

6 views

1. len(str)

2. str.title() or str.capitalize()

3. str.isalpha and str.isdigit()

4. lower(str[i])

5. str.replace(char, newchar)

6 views