Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Programming»Python»How to Convert String to Lowercase in Python

    How to Convert String to Lowercase in Python

    By RahulOctober 14, 20191 Min ReadUpdated:August 1, 2022

    Sometimes you may require to convert any string to lowercase (all letters). This tutorial will help to convert a string (any case) to lower case as shown in the below image.

    Advertisement

    Python string to lowercase

    Convert String to Lower Case

    In the Python programming language you can use the lower() method to convert any string to lower case. Here is the sample Python code to convert string to lowercase.

    1
    2
    >>> s = "HeLLo Python"
    >>> print(s.lower())

    Output
    hello python

    Suggested reading

    Some more examples of string conversions in Python.

    • Convert String to Uppercase in Python
    • Python Convert String to Lowercase

    Python
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Install Python 3.11 on Amazon Linux 2

    Installing Python 3.11 on Debian Linux

    How To Install Python 3.11 on Debian 11/10

    Installing Python 3.11 on Ubuntu, Debian and LinuxMint

    How To Install Python 3.11 on Ubuntu, Debian and LinuxMint

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.