How will you capitalize the first letter of string?

Answers were Sorted based on User's Feedback



How will you capitalize the first letter of string?..

Answer / nashiinformaticssolutions

Python's capitalize() method capitalizes the first letter of a string. It gives back the original text if the string starts with a capital letter already.

Is This Answer Correct ?    0 Yes 0 No

How will you capitalize the first letter of string?..

Answer / glibwaresoftsolutions

Python's capitalize() method capitalizes the first letter of a string. It gives back the original text if the string starts with a capital letter already.

Is This Answer Correct ?    0 Yes 0 No

How will you capitalize the first letter of string?..

Answer / hr@tgksolutions.com

Python's capitalize() method capitalizes the first letter of a string. It gives back the original text if the string starts with a capital letter already.

Is This Answer Correct ?    0 Yes 0 No

How will you capitalize the first letter of string?..

Answer / Sudhanshu Bajpai

To capitalize the first letter of a string in Python, you can use the built-in upper() function along with slice notation. Here is an example: nn```pythonns = 'hello world'ns_capitalized = s[0].upper() + s[1:]n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

Why python is better?

1 Answers  


What are different ways to create an empty numpy array in python?

1 Answers  


Does python use ram?

1 Answers  


What is chmod 755 in python?

1 Answers  


Does python support database programming?

1 Answers  


Is end a keyword in python?

1 Answers  


Can you learn python with no experience?

1 Answers  


Which is faster c++ or python?

1 Answers  


Why is that none of my threads are not running? How can I make it work?

1 Answers  


How do you perform pattern matching in python? Explain?

1 Answers  


Which software is best for python programming?

1 Answers  


What applications are written in python?

1 Answers  


Categories