convert uppercase to lowercase and vice versa in python

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

showing results for - "convert uppercase to lowercase and vice versa in python"
Adan
15 Mar 2019
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        
Michele
19 Feb 2020
1def swap_string():
2	s=input()
3	swapped_string=""
4	swapped_string+=s.swapcase()
5    return swapped_string
Mirielle
29 Feb 2019
1#Converting a given string's lower to upper case and Vise-versa
2c = input()
3i = 0
4j = [] #Declaring empty List
5for i in range(len(c)): #For Acessing elements in string. 
6    if c[i]==c[i].lower(): #For finding the Lower-case or Upper-case elements
7     j.append(c[i].upper()) #Adding the new chhanged Upper-case element to j
8    else :
9        j.append(c[i].lower()) #Adding the new changed Lower-case elements to j
10f = ''.join([str(elem) for elem in j])  #converting list to String
11print(f)
12#sample input : Ashish
13#sample output : aSHISH
queries leading to this page
change upper case to lower pythonhow to convert the uppercase letters in the string to lowercase in python 3f lowercase 28 29 capilaize 28 29 lower 28 29 tolower 28 29how to swap casecaps to small in python and small to caps in pythonhow to convert a capital letter to a lowercase letter in pythonhwo to caps letters in pythoncapital letter to small letter pythoncount uppercase and lowercase in pythonhow to convert lowecase sentence into uppercase in pythonhow to convert a character from lowercase to uppercase in pythonpython change lowercase to uppercasechange lowercase string to uppercase in pythonpython turn all capsall caps pythonmix str of upper and lowercase letters converter in pythonconvert all letters to upper case pythonuppercase transfer to and vice versa in pythonchange the case in pythonhow to convert caps to small in pythonhow to make a uppercase letter to lowercase pythonconvert upper to lower and lower to upper in pythonpython to capshow to transform lowercase to upper case in pythonall character uppercase and lowercase pythoncase change in pythonpython all character capschange case of character in string pythonconvert lowercase to uppercase pythoncapital to small latter convert in python python program to calculate the number of uppercase letters and lowercase letters in a stringcase swap pythonconverting capital letters to lowercase and viceversa in pythonhow to turn capital letters into lowercase of a word file in pythonpython swap letter caseconvert string to all caps pythonconverting capital letter to small letter in pythonhow to swap a lowercase character to uppercase in pythonto upper and to lower individual cha in pythonwrite a code to convert uppercase to lowercase and vice versa in a string pythonhow to convert a string letter to capital pythonhow to make python read uppercase and lowercase letters in defconvert the lowercase letter to the capital letter and vice versa pythoncheck caps status of letter pythonreverse string and convert lower case to upper and upper case to lower pythonwhat to add to change from uppercase to lowercase in pythonpython all caps stringchanging upper and lowercase case in pythoncapital to small letters pythonconvert decussate lowercase letters to uppercase letters in pythonhow to convert uppercase alphabet into lowercase in pythonpython string to capschange capital to lowercase pythonconverting uppercase to lowercase in pythonhow to change lowercase to uppercase in pythonhow to convert uppercase to lowercase and vice versa in pythonpython put string all in capschar lower to upper pythonhow to turn the capital letters in small letter and small letter into capital letter pythonconvert char to uppercase pythonmake everything caps pythonhow to convert all caps to lowercase in pythonpython to all capscalcuate the number of upper case and lower case letters in string pythonpython capitalize making string lowerswap casehow to change small letter to capital in pythonhow to convert small to capital pythonconvert all lower case to uppercase and viece versa in python functionhow to make capital letters lowercase in pythonpython program switch uppercase and vice versahow to make a strng all caps in pythonhow to vhange lowercase to uppercase pythonpython program to find number of uppercase and lowercase lettershow to convert a lowercase char to uppercase in pythonconvert lowercase to uppercase using pythonchange small letter to capital letter pythnohow to make python read uppercase and lowercase lettersfind upper and lower case letters pythonhow to turn capital letters into lowercase in pythonpython program to convert uppercase to lowercase and vice versa in a stringuppercase character read lowercase character in pythonin order to convert the text from uppercase to lowercase in pythonchange uppercase to lowercase and lowercase to uppercasepythonchange case in pythonyour program must switch the case of each character of the given string in pythonpython make a string all capschange capital letters to lowercase pythonmake all caps small in pythonhow to turn uppercase to lowercase in pythonis text is lowercase make it upper pythonpython find character in string lower or capitalhow to change a lowercase letter to uppercase in python encodingchange the case of string in pythonchanfging case in pythonhow to compare a string with any capital letter or small letter pythonpython ie 2c lowercase to uppercase and vice versa 3fconvers caps to small string pythonpython capital letters lower caselower upper caps in python checkpython change case of stringpython remove different uppercase letters and lowercase wwordsmake string all caps pythonpython upper to lower and lower to upperconvert all lowercase letters to uppercase letters and vice versa in pythoncapital letters a less than small in pythonchange lower case letters to uppercase in pythonprogram to replace lower case characters with upper case and vice versa in pythonchange lowercase to uppercase in pythonpython program to convert uppercase to lowercasehow to convert uppercase to lowercase and lowercase to uppercase in same string in pythonpython how many letters are capital in straingwhy variables in caps pythonpython change capital letters to small letterpython string uppercasechar from lower to upper case pythonhow to replace capital letters to small in pythonif uppercase python change lowercase and vice versa pythonswitch letter case pythonchar val in python for lowercase and uppercasepython program to convert lowercase to uppercase and vice versato convert lowercase to uppercase and vice versa in pythonconvert capital letter to small in pythonhow to transform capital letters in lowecase in pythonhow to change uppercase letter to lowercase letter without using string pytonturning uppercase letters to small and turning letters lowercase letters to uppercase in a string in pythonhow to change python from upper case to lower casestring to caps pythonhow to convert uppercase to lowercase and lower to upper in python stringhow to switch upper lower case in pythonstring capitals or small pythondoes capital letter and small letter same in pythonhow to convert lowercase to uppercase and vice versa in pythonchange string to all lowercase 2fuppercase pythonconverting lowercase to uppercase and vice versa in pythonconvert upper letter to lower and lower to upper letter in python without looppython program to count uppercase and lowercase in a stringpython change case of a characterpython code to convert lowercase to uppercasehow to swap cases in pythonhow to change uppercase to lowercase in pythonchange case function in pythonmake all caps pythonconvert lowercase to uppercase and upper case in lower case in pythonconvert lowercase to uppercase in python without using functionpythom small letter to a capital letterconvert uppercase to lowercase pythonupper to lower and lower to upper in pythonall uppercase letters should become lowercase pythonconvert all lowercase character to uppercase and vice versa in pythonchange lower case to uppercase and uppercase to lowercase pythonwhat function in python convert all uppercase to lowercase and lower case to uppermake a string all caps pythonchange uppercase to lowercase in pythonconvert all uppercase letters to lowercase letters in python3how make capitalized letters lowercase and lowercase letters uppercase pythonpython function name with capital lower case lettersturn to small caps in pythonlowercase to uppercaseof character in pythonpython chr capital and lowerpython capitalized to lowerpython program to print uppercase to lowercase and lower case to upper casechanging upper and lowercase in pythonconvert capital to small in pythoncapital letter to small letter pythohow to write a function that converts all lowercase to uppercase and all uppercase to lowercasereturn in capital or lowercase pythonusing python to change capital into smallhow to convert upper case letter to lower in pythonconvert capital letter to small letter pythonhow to count uppercase and lowercase in pythonpython capitalize letter to small letterupper case letter lower case letter pythonswapping case in pythonconvert sentence to caps pythonlowercase to uppercase and vice versa in pythonhow to change lower to upper and vice versa at same time in pythonswap case pythonconvert uppercase to lowercase pythonconvert all lower to uppercase pythonconvert to small case in pythonhow to turn the small letters of string to capital in pythontoggle upper to lowercase pythonhow to change capital letters to lowercase in pythonfunction in python for uppercase or lowercase an entire stringwrite a python program to convert lowercase character into uppercase and uppercase character into lowercasechange lowercase char to upper in pythonupper lower alphabet in pythonhow to convert all caps string in pythonuppercase to lowercase python codepython function capital letters lower casepython calculate the number of upper case letters and lower case letterspython upper lower and sentence exampleone lowercase letter one uppercase letter and a number pythonhow to upper case and lower case in pythondiferencia entre uppercase and lowercase pytonpython code for taking lowercase uppercase and numbers and etc in the pythonconvert all letters to uppercase pythonconvert all lowercase to uppercase python and vice versapython replace caps letter into small letterchange uppercase to lowercase in python3change upper to lower and lower to upper in pythonswapcase syntax in pythonhow to convert from uppercase to lowercase in pythoncreate space between small letter and capital letter in string pythonhow to count upper and lowercase letters in pythonhow to convert uppercse to lowercase in python convert lowercase to uppercase using function in pythonsmall to caps in pythoncapital to small pythonhow to convert small to capital in pythonprint lower case letter from capital letters pythonput letters capital pythonhow to make lower case upper case in pythonpython print all lowercase letters to uppercasehow to convert uppercase to small case in pythonpython make lowercase upp and upper case lowerpython capital letter to smallconverting a single letter to upper pythonpython convert text to capspython how to change lowercase to uppercaseconvert uppercase to lowercase and vice versa in pythontransform string into capital letters pythonhow to make python program work with either capital letters or lowercaseconvert small letter to capital in pythonhow to seperate a string by capitals pythonsmall letters to capital letters code in pythonpython swap casepython caps letter examplelowercase uppercase mix pythonhow to match capital letter and small in pythoncaps to small in python and small to caps at a time in pythonif i write upperacse and lowercase letter how can i treat both of them as same in pythonlower and upper case letters in pythonconvert lower to upper and upper to lower in pythonhow to convert a sentence swapped cases in pythonpython string all capspython string small capswrite a python program to chang upper to lower case strings and vice versa who to make a string all in low caps pythonhow to change case of string in pythoncount the number of upper case letters and lower case letters in pythonno of uppercase and lowercase letteers in pythonwrite a python program to convert uppercase strings to togglecasepython convert capital letters to lowercasehow to convert uppercase to lowercase in pythonchanging uppercase to lowercase in pythonswapping cases in pythonpython program to print lowercase to uppercase and vice versahow to write a small upper letter in pythonconverting lowercase to uppercase in pythonhow to change upper and lower case pythonpython switch uppercasestring to all caps pythonsmall to capital letter in pythonhow to convert capital letters to small letters vice versa in pyhtonconvert capital letters to small in pythonuppercase lowercase and number symbol in pythonuppercase to lowercase and lowercase to uppercase in pythonconvert to caps string pythonconvert upper case to lower case pythonhow to change uppercase letter to lowercase letter pythonhow to make a capital letter equal to a lowercase in pythonchange upper to lowercase and lower to uppercase pythonpython small capshow to convert lower to upper case in pythonhow yo change letters to capital pythonupper and lower case letter in pythonconvert uppercase to lowercase in pythonhow to convert uppercase to lowercase and lowercase to uppercase in pythonhow to turn uppercase into lowercase in pythonhow to convert uppercase to lowercase and vice versa in python without loophow to turn a uppercase letter to a lower case in pythonfunction to convert uppercase to lowercase in pythonhow to change uppercase to lowercase and lowercase to uppercase in pythonhow to print a capital or lowercaseis uppercase lower than lower case in pythonpython reverse upper and lowercase of stringhow to convert capital letters to small letters in pythonconvert letter to capital in pythonupper letter into lower letter vice versa of the given string pythonstring change lowercase to uppercase and vice versa pythonchange lowercase to uppercase in python for stringwhat function in python convert all uppercase to lowercasecapital letter to lowercase pythonstring lower and uppercase alphabet pythonfind out number of uppercase and lower case characters in string using pythonalphabet compare small capital pythonhow to convert uppercase to lowercase in python and vice versahow to change lower case to upper case and upper case to lower case in pythonjs converting lowercase to uppercase and vice versa in pythonone string can read uppercase and lowercase character pythonhow to change lower case to upper pythoncharacter upper case and lowwer casein pythonhow to convert the uppercase letters in the string to lowercase in python 3fchange to caps pythonhow to turn lowercase letters into uppercase letters pythonconvert all lowercase letters to uppercase letters in python uppercase to smallercase pythonconverting upper case to lower case in string pythonswap case in pythonconvert 1 word to upper case in pythonconvert one char lowercase to uppercase pythonconvert all lower case to uppercase and viece versa in pythonhow to change case in pythonpython function tyo swap the casespython small caps upper how to convert lowercase to uppercase and uppercase to lowercase in python at timein python convert the smaller case letter in the uppercase letterhow to make a string have upper case and lower case pythonmake all letters caps pythonpython to convert upper case to lowerhow to convert upper case to lower in pythonpython function to convert uppercase to lowercaseconvert uppercase to lowercase and vice versa in python