Write a program in python that capitalize each letter in string
Answers
Answered by
1
Answer:
string = "Hello brother"
new_str = ""
for char in string:
new_str += char.upper()
print( new_str)
Explanation:
As your string is iterable object.. for loop can be used and upper() method is used to capilalize a character.
Similar questions
Computer Science,
1 month ago
Physics,
1 month ago
English,
4 months ago
Math,
4 months ago
Math,
10 months ago
CBSE BOARD X,
10 months ago