top of page
Writer's pictureKrunal Chandan

Python #8 : Capitalize!


Welcome all to our new blog of our first series i.e., HackerRank Python Solutions, where we provide solutions to the problems given on HackerRank Website of Python.



So, today we are going to see the problem of capitalise in the Python section of HackerRank Website.



Here we have to capitalise the starting character of every single word it gives as a sample we are dealing with good example and here we will use this code given below for fertilizing the first letter of each word.


def solve(s): for x in s[:].split(): s = s.replace(x, x.capitalize()) return s So here we can see we capitalize every word by just using this function, If you wanna understand more, you should learn about the split function that is used in this function.


Till Then, #Coders😎

5 views0 comments

Recent Posts

See All

Last Blogg For KNBLOGGS

My last blogg about gaming from your android, or my other blogs, that I published earlier were not a big hit, not like this website or...

Comments


About Us

LOGO_MAIN.jpg

Welcome to KN Blogg, the place where we're serious about tech, finance, movies, and games. Or at least, we try to be. We're a team of self-proclaimed experts, enthusiasts, and sometimes just plain clueless individuals, who love to share our thoughts, opinions, and occasional witty remarks with the world.

Posts Archive

Tags

bottom of page