If we want to get the result irrespective of upper or lower cases then we can change the whole string into the upper case or lower case. If we want the result as uppercase characters and their frequency then change the whole string to uppercase else change it to lowercase. So for this, I create a variable and iterate through that. string2 = string.upper() for i in string2: ....................... output for the above case : {G:2, O:2,L:1,E:1} You can do string.lower() for the output {g:2, o:2,l:1,e:1}
@disco95212 жыл бұрын
can you make the tutorial of this code Peter Piper picked a peck of pickled peppers A peck of pickled peppers Peter Piper picked If Peter Piper picked a peck of pickled peppers Where's the peck of pickled peppers Peter Piper picked? The number of P's and p's is Capital letter P : 8 Small letter p : 28 using for loop
@rutujabadre43723 жыл бұрын
Make video on write a program in Python to check whether a number can be expanded as the sum of two prime number
@codesetup2653 жыл бұрын
Hi, I made the video on this topic, where I explained the logic but not the code. However, I linked the python code in the description. I hope it helps... kzbin.info/www/bejne/h6rHhKhorMShipo