Capitalize! HackerRank #Python

Problem Statement:
You are asked to ensure that the first and last names of people begin with a capital letter in their passports. For example, alison heck should be capitalised correctly as Alison Heck.
i/p : alison heck
o/p: Alison Heck
Note: in a word only the first character is capitalized. Example 12abc when capitalized remains 12abc.

Solution 1:

def solve(s):
    return ' '.join(i.capitalize()   for i in s.split(' '))

Solution 2:

import string
def solve(s):    
     return string.capwords(s,' ')


  1. EdwardPag said:

    cheap generic drugs from india cheap tadalafil
    pills without a doctor prescription

    March 10, 2021
  2. JasonNox said:

    where can i buy viagra over the counter viagra online usa
    buy generic 100mg viagra online

    March 13, 2021
  3. Marvinwag said:

    neurontin pills for sale: buy gabapentin – over the counter neurontin

    March 27, 2021
  4. Marvinwag said:

    how much is prednisone 5mg: buy prednisone – price of prednisone tablets

    March 28, 2021
  5. Alfredskach said:

    male erectile pills: viagra pills generic viagra pills

    April 8, 2021
  6. Hi there, There’s no doubt that your web site could possibly
    be having web browser compatibility problems. When I take a
    look at your website in Safari, it looks fine
    however when opening in Internet Explorer, it’s got some overlapping issues.
    I merely wanted to give you a quick heads up! Apart from that,
    fantastic site! 0mniartist asmr

    April 10, 2021
  7. 0mniartist said:

    It’s enormous that you are getting thoughts from
    this paragraph as well as from our discussion made at this time.
    asmr 0mniartist

    April 12, 2021
  8. 0mniartist said:

    Wonderful blog! I found it while browsing on Yahoo News.
    Do you have any tips on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to
    get there! Cheers 0mniartist asmr

    April 12, 2021
  9. Claudmam said:

    amoxicillin 875 125 mg tab: cheap amoxicillin – amoxicillin 500 mg without a prescription

    April 13, 2021
  10. said:

    I love what you guys are usually up too. This kind of clever work and reporting!
    Keep up the very good works guys I’ve incorporated you guys to my own blogroll.
    asmr 0mniartist

    April 14, 2021
  11. Claudmam said:

    can you buy diflucan over the counter in usa: diflucan tablet price – diflucan pills online

    April 14, 2021
  12. said:

    Hello everyone, it’s my first pay a quick visit at this web site, and article is in fact
    fruitful designed for me, keep up posting these articles.
    asmr 0mniartist

    April 16, 2021
  13. RafaelLeree said:

    buy lasix online: buy lasix – buy furosemide online

    April 17, 2021
  14. RafaelLeree said:

    paxil 10 mg: cheap paxil – paxil bipolar

    April 18, 2021
  15. JamesMem said:

    valtrex 1500 mg: generic valtrex – valtrex rx where to buy
    buy propecia no prescription

    April 21, 2021
  16. JamesMem said:

    can you buy ventolin over the counter in singapore: cheap ventolin – ventolin medicine
    propecia hair

    April 22, 2021
  17. JamesMem said:

    ventolin prices in canada: ventolin script – where can i buy ventolin over the counter
    purchase propecia no prescription

    April 23, 2021
  18. JamesMem said:

    tadalafil: tadalafil 20mg – tadalafil 20mg for sale
    propecia costs

    April 25, 2021
  19. JamesMem said:

    cost for valtrex: valtrex for sale – valtrex online pharmacy india
    where to buy propecia

    April 25, 2021
  20. Georgehet said:

    ed dysfunction treatment: ed drugs – ed pills
    generic ed pills

    April 27, 2021
  21. gamefly it said:

    I’m truly enjoying the design and layout of your
    blog. It’s a very easy on the eyes which makes it much more enjoyable for me to come here
    and visit more often. Did you hire out a developer to create your theme?
    Fantastic work!

    April 28, 2021
  22. asmr and said:

    Spot on with this write-up, I absolutely believe that this web site needs a lot
    more attention. I’ll probably be back again to read more, thanks for the information!

    April 29, 2021
  23. asmr this said:

    If you are going for most excellent contents like I
    do, simply go to see this web site every day as it offers feature contents, thanks

    April 29, 2021
  24. asmr my said:

    whoah this weblog is magnificent i really like
    reading your articles. Stay up the good work! You already know, a lot of people are hunting around for this information, you can aid them greatly.

    April 29, 2021
  25. gamefly when said:

    I’m very happy to discover this web site. I wanted to thank
    you for your time just for this fantastic read!!
    I definitely appreciated every bit of it and I have you book marked to see new information in your blog.

    May 3, 2021
  26. and asmr said:

    This design is spectacular! You definitely know how to keep a reader entertained.

    Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Excellent
    job. I really loved what you had to say, and more than that, how you
    presented it. Too cool!

    May 4, 2021
  27. Hi to every body, it’s my first pay a visit of this website;
    this website contains awesome and truly good information for visitors.

    May 7, 2021

Leave a Reply

Your email address will not be published.