• How would you convert a string into lowercase?

    Answered

    How would you convert a string into lowercase?

    Silver Member Asked on June 4, 2018 in Python.
    Add Comment
  • 1 Answer(s)
    Best answer

    We use the lower() method for this.

    
    'AyuShi'.lower()
    
    

    O/P= ‘ayushi’
    Also, to check if a string is in all uppercase or all lowercase, we use the methods isupper() and islower().
    So, characters like @ and $ will suffice for both cases.

    Also, istitle() will tell us if a string is in title case.

    
    'The Corpse Bride'.istitle()
    
    

    Silver Member Answered on June 4, 2018.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.