how to convert uppercase to lowercase and vice versa in python

Solutions on MaxInterview for how to convert uppercase to lowercase and vice versa in python by the best coders in the world

showing results for - "how to convert uppercase to lowercase and vice versa in python"
Valeria
25 Apr 2018
1s=input()
2new_str=""
3for i in range (len(s)):
4    if s[i].isupper():
5        new_str+=s[i].lower()
6    elif s[i].islower():
7        new_str+=s[i].upper()
8    else:
9        new_str+=s[i]
10print(new_str)
11        
12        
Julienne
11 Feb 2020
1def swap_string():
2	s=input()
3	swapped_string=""
4	swapped_string+=s.swapcase()
5    return swapped_string
queries leading to this page
python change case of a characteruppercase lowercase and number symbol in pythonconverting upper case to lower case in string pythonpython capitalized to lowerconvert all letters to upper case pythonstring to caps pythonhow to switch upper lower case in pythonpython capitalize making string lowerhow to convert upper case to lower in pythonchar from lower to upper case pythoncase swap pythonpython code to convert lowercase to uppercasepython ie 2c lowercase to uppercase and vice versa 3fpython program to calculate the number of uppercase letters and lowercase letters in a stringcreate space between small letter and capital letter in string pythonhow to convert uppercase to lowercase and vice versa in python without loopconverting a single letter to upper pythonconvert capital letter to small letter pythonpython function tyo swap the casesto upper and to lower individual cha in pythonmake a string all caps pythonhow to convert a sentence swapped cases in pythonpython capital letter to smallhow to upper case and lower case in pythonchange case of character in string pythonhow to make python read uppercase and lowercase letters in defpython string all capshow to convert lowercase to uppercase and uppercase to lowercase in python at timeconvert sentence to caps pythonpython capital letters lower casepython turn all capspythom small letter to a capital letterchange uppercase to lowercase in pythonchar val in python for lowercase and uppercasepython convert capital letters to lowercasepython how many letters are capital in straingwhat to add to change from uppercase to lowercase in pythonhow to convert a character from lowercase to uppercase in pythonhow to convert from uppercase to lowercase in pythonhow to make a strng all caps in pythonpython to all capshow to turn the capital letters in small letter and small letter into capital letter pythonpython calculate the number of upper case letters and lower case lettersswitch letter case pythonwrite a python program to convert lowercase character into uppercase and uppercase character into lowercasepython function capital letters lower casehow to convert lowecase sentence into uppercase in pythonconvert all lower case to uppercase and viece versa in pythonpython make a string all capshow to change lower to upper and vice versa at same time in pythonchange lower case to uppercase and uppercase to lowercase pythonconvert lowercase to uppercase using function in pythonpython code for taking lowercase uppercase and numbers and etc in the pythoncapital to small latter convert in python how to convert capital letters to small letters in pythonchange lowercase to uppercase in pythonuppercase character read lowercase character in pythonchange case in pythonswapping cases in pythonis uppercase lower than lower case in pythonhow to change uppercase to lowercase and lowercase to uppercase in pythonpython string small capshow to compare a string with any capital letter or small letter pythonhow to swap casehow to make a string have upper case and lower case pythonpython small capspython chr capital and lowerconvert to caps string pythonconvert lowercase to uppercase and upper case in lower case in pythoncapital letter to small letter pythonin order to convert the text from uppercase to lowercase in pythonhow to turn uppercase into lowercase in pythonhow to turn capital letters into lowercase of a word file in pythonchanging upper and lowercase in pythonhow to change case in pythonhow to convert upper case letter to lower in pythonhow to change python from upper case to lower caseswap case in pythonconvert upper to lower and lower to upper in pythonhow to turn capital letters into lowercase in pythonconvert small letter to capital in pythonpython to convert upper case to lowerhow to convert the uppercase letters in the string to lowercase in python 3f lowercase 28 29 capilaize 28 29 lower 28 29 tolower 28 29converting capital letter to small letter in pythonpython put string all in capshow to convert uppercase to lowercase and vice versa in pythonpython upper to lower and lower to upperswapping case in pythonhow to change upper and lower case pythonhow to change capital letters to lowercase in pythonpython all caps stringhow to vhange lowercase to uppercase pythonconvert all letters to uppercase pythonmake all caps small in pythonconvert uppercase to lowercase in pythoncaps to small in python and small to caps in pythonchange lowercase string to uppercase in pythonwrite a python program to chang upper to lower case strings and vice versa write a python program to convert uppercase strings to togglecaseconverting capital letters to lowercase and viceversa in pythonreturn in capital or lowercase pythonpython change lowercase to uppercasechange capital to lowercase pythoncount uppercase and lowercase in pythonchange the case in pythonchange lower case letters to uppercase in pythonconvert lowercase to uppercase in python without using functionpython function name with capital lower case letterssmall to capital letter in pythontoggle upper to lowercase pythonconvert uppercase to lowercase and vice versa in pythoncheck caps status of letter pythonconvert lowercase to uppercase using pythonchange upper to lowercase and lower to uppercase pythonpython how to change lowercase to uppercaseconvert all lowercase to uppercase python and vice versastring change lowercase to uppercase and vice versa pythonhow to convert all caps string in pythonconvert all lower to uppercase pythonchanfging case in pythonhow to change small letter to capital in pythonswapcase syntax in pythonchange capital letters to lowercase pythonpython program to print uppercase to lowercase and lower case to upper casehow to change uppercase letter to lowercase letter pythonhow to change a lowercase letter to uppercase in python encodinglower upper caps in python checkpython to capshow to change lowercase to uppercase in pythonchange small letter to capital letter pythnoswap case pythonhow to replace capital letters to small in pythonhow to convert the uppercase letters in the string to lowercase in python 3fconvert decussate lowercase letters to uppercase letters in pythonhow make capitalized letters lowercase and lowercase letters uppercase pythonsmall to caps in pythonupper to lower and lower to upper in pythonhow to change uppercase to lowercase in pythonfind upper and lower case letters pythonfunction to convert uppercase to lowercase in pythonlowercase uppercase mix pythonto convert lowercase to uppercase and vice versa in pythonchange lowercase char to upper in pythonhow to swap a lowercase character to uppercase in pythonwrite a code to convert uppercase to lowercase and vice versa in a string pythonhow to count uppercase and lowercase in pythonhow to convert small to capital pythonhow to convert uppercase to lowercase in pythoncapital letter to lowercase pythonchanging uppercase to lowercase in pythonhow to convert lower to upper case in pythonhow to convert lowercase to uppercase and vice versa in pythonupper case letter lower case letter pythonhow to swap cases in pythonpython string uppercasehow yo change letters to capital pythonpython program to count uppercase and lowercase in a stringsmall letters to capital letters code in pythonall caps pythonpython reverse upper and lowercase of stringconvert upper case to lower case pythonstring lower and uppercase alphabet pythonconvert string to all caps pythonhow to convert uppercase to lowercase and lowercase to uppercase in pythonhow to convert uppercase to lowercase and lowercase to uppercase in same string in pythonpython convert text to capspython program to convert lowercase to uppercase and vice versahow to convert small to capital in pythonupper lower alphabet in pythonone lowercase letter one uppercase letter and a number pythonhow to make python read uppercase and lowercase lettershow to make capital letters lowercase in pythonyour program must switch the case of each character of the given string in pythonpython print all lowercase letters to uppercaseconvert the lowercase letter to the capital letter and vice versa pythonchange upper to lower and lower to upper in pythonconvert capital letter to small in pythonturn to small caps in pythonhow to change case of string in pythonpython caps letter exampleswap casestring to all caps pythonprint lower case letter from capital letters pythonpython make lowercase upp and upper case lowerpython swap casehow to convert a capital letter to a lowercase letter in pythonhow to match capital letter and small in pythonif i write upperacse and lowercase letter how can i treat both of them as same in pythonusing python to change capital into smallpython switch uppercaseturning uppercase letters to small and turning letters lowercase letters to uppercase in a string in pythonis text is lowercase make it upper pythonone string can read uppercase and lowercase character pythonconverting lowercase to uppercase and vice versa in pythonfunction in python for uppercase or lowercase an entire stringchange the case of string in pythonhow to change uppercase letter to lowercase letter without using string pytonpython program to convert uppercase to lowercase and vice versa in a stringmake all caps pythonhow to change lower case to upper case and upper case to lower case in pythonpython upper lower and sentence examplecapital to small letters pythonconvert upper letter to lower and lower to upper letter in python without loopchar lower to upper pythonconvert to small case in pythonhow to transform capital letters in lowecase in pythonuppercase to lowercase and lowercase to uppercase in pythonpython swap letter casemix str of upper and lowercase letters converter in pythonhow to convert uppercase to lowercase and lower to upper in python stringpython program to print lowercase to uppercase and vice versahow to change lower case to upper pythonconvert all lower case to uppercase and viece versa in python functioncapital letter to small letter pythocapital to small pythonchange upper case to lower pythonconverting uppercase to lowercase in pythonuppercase transfer to and vice versa in pythonpython program switch uppercase and vice versapython all character capsconvert lower to upper and upper to lower in pythonconvert letter to capital in pythonhwo to caps letters in pythonpython string to capshow to seperate a string by capitals pythonconvert uppercase to lowercase pythonmake everything caps pythonconvert all lowercase letters to uppercase letters in pythonhow to turn lowercase letters into uppercase letters pythonif uppercase python change lowercase and vice versa pythonconvert all lowercase letters to uppercase letters and vice versa in pythonconvert capital to small in pythonlowercase to uppercase and vice versa in pythonpython change case of stringcapital letters a less than small in pythonuppercase to lowercase python codechange case function in pythonreverse string and convert lower case to upper and upper case to lower pythonupper letter into lower letter vice versa of the given string pythonhow to write a function that converts all lowercase to uppercase and all uppercase to lowercaseno of uppercase and lowercase letteers in pythoncase change in pythonconvert char to uppercase pythonlowercase to uppercaseof character in pythonstring capitals or small pythonhow to convert capital letters to small letters vice versa in pyhtonall character uppercase and lowercase pythonjs converting lowercase to uppercase and vice versa in pythonfind out number of uppercase and lower case characters in string using pythonchanging upper and lowercase case in pythonconvers caps to small string pythonin python convert the smaller case letter in the uppercase letterchange to caps pythonhow to turn the small letters of string to capital in pythonconvert lowercase to uppercase pythoncaps to small in python and small to caps at a time in pythondoes capital letter and small letter same in pythonhow to convert uppercase to lowercase in python and vice versahow to convert uppercase to lowercase and vice versa in python