Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Programming»Python»How to Convert String to Uppercase in Python

    How to Convert String to Uppercase in Python

    RahulBy RahulMay 14, 20191 Min ReadUpdated:October 14, 2019

    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.

    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.

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

    Suggested reading

    Some more examples of the string conversions in Python.

    • Convert String to Lowercase in Python
    Python
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to sort du -h command output by size
    Next Article How to Install Webmin on Ubuntu 18.04 & 16.04 LTS

    Related Posts

    How to Find Django Install Location in Linux

    Updated:April 27, 20221 Min Read

    How To Install Python 3.10 on Debian 11/10

    2 Mins Read

    How to Install Python 3.10 on CentOS/RHEL 8 & Fedora 35/34

    Updated:February 12, 20223 Mins Read

    How To Install Python 3.10 on Ubuntu, Debian & Linux Mint

    Updated:April 22, 20222 Mins Read

    How to Switch Python Version in Ubuntu & Debian

    Updated:April 22, 20223 Mins Read

    Working with Python Functions

    6 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install Sublime Text 4 on Ubuntu 22.04
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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