Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

converting capital letters to lowercase and viceversa in python

s=input()
new_str=""
for i in range (len(s)):
    if s[i].isupper():
        new_str+=s[i].lower()
    elif s[i].islower():
        new_str+=s[i].upper()
    else:
        new_str+=s[i]
print(new_str)
        
        
Comment

how to convert lower case to upper case in python

a = "Hello, World!"
print(a.upper())
#output: HELLO, WORLD!
Comment

PREVIOUS NEXT
Code Example
Python :: plt.savefig without showing 
Python :: np install python 
Python :: How to convert a string to a dataframe in Python 
Python :: delay time python 
Python :: numpy round 
Python :: df change column names 
Python :: how to get the index of a value in pandas dataframe 
Python :: show pandas all data 
Python :: show pythonpath 
Python :: perimeter of semicircle formula 
Python :: how to find current age from date of birth in python 
Python :: use of the word bruh over time 
Python :: python join list of strings with separator 
Python :: find two number in python 
Python :: matplotlib ticksize 
Python :: python alphabet string 
Python :: how does sns boxplot determine outliers 
Python :: django text area limit characters 
Python :: pil image from numpy 
Python :: count the frequency of words in a file 
Python :: python endswith list 
Python :: drop unamed columns in pandas 
Python :: last 2 numbers of integer in python 
Python :: python input map 
Python :: fake migration 
Python :: how to access all the elements of a matrix in python using for loop 
Python :: rotatable list python 
Python :: avatar discord.py 
Python :: pandas merge dataframes from a list 
Python :: average within group by pandas 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =