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 Uppercase in Python

    How to Convert String to Uppercase in Python

    By RahulAugust 1, 20221 Min Read

    Some times you may require to convert any string to uppercase (all letters). This tutorial will help to convert a string (any case) to the upper case as showing in the below image.

    Advertisement

    Python String to Uppercase

    Convert String to Upper Case

    Using Python programming language you can use string .upper() function to convert any string to upper case. Here is the sample Python code to convert string to uppercase.

    1
    2
    3
    4
    >>> s = "Hello Python"
    >>> print(s.upper())
     
    HELLO PYTHON

    Suggested reading

    Some more examples of string conversions in Python.

    • Convert String to Lowercase in Python

    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
    • How to Split Large Archives in Linux using the Command Line
    • System.out.println() Method in Java: A Beginner’s Guide
    • Split Command in Linux With Examples (Split Large Files)
    • Test Your Internet Speed from the Linux Terminal
    • 11 Practical Example of cat Command in Linux
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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