• Skip to primary navigation
  • Skip to content
  • Skip to footer
Eliannys Cermeño
  • Home
  • Post
  • About
    Eliannys Cermeño

    Eliannys Cermeño

    Technical Analyst at Stratesys

    • Linkedin
    • GitHub
    • Youtube

    How will you convert a string to all lowercase?

    less than 1 minute read

    • To convert String to lowercase, you can use lower()v function on the String. String.lower() function returns a string with all the characters of this string converted to lower case.

    • Syntax - string.lower()

    text = "A - B - C - D - E - F"
    x = text.lower()
    print(x) 
    
    # Output:
    a - b - c - d - e - f
    

    Reference

    Lowercase

    Tags: Python exercise

    Updated: September 9, 2021

    Twitter Facebook LinkedIn
    Previous Next

    You May Also Enjoy

    How do you write comments in python?

    less than 1 minute read

    A single line comment can be added by using the hash (#)character. The hash (#) is added for every line that should be commented. Example: #This is a comme...

    What means list [-1]?

    less than 1 minute read

    Suppose: list = [2, 33, 222, 14, 25] print(list[-1]) Options: A) Error B) None C) 25 D) 2 Answer: C) 25. The index -1 corresponds to the last index ...

    Which of the following is an invalid statement?

    less than 1 minute read

    A) numbers = 1,000,000 B) numbers = 1000 2000 3000 C) numbers = 1000, 2000, 3000 D) numbers = 1,000,000 Answer: B) numbers = 1000 2000 3000 Whitespace i...

    Why are local variable names beginning with an underscore?

    less than 1 minute read

    A) They are used to indicate a private variables of a class. B) They confuse the interpreter. C) They are used to indicate global variables. D) They slow ...

    • Linkedin
    • GitHub
    • Youtube
    • Feed
    © 2022 Eliannys Cermeño. Powered by Jekyll & Minimal Mistakes.