This question already has an answer here:
I want to randomly capitalize or lowercase each letter in a string. I'm new to working with strings in python, but I think because strings are immutable that I can't do the following:
i =0 for c in sentence: case = random.randint(0,1) print("case = ", case) if case == 0: print("here0") sentence[i] = sentence[i].lower() else: print("here1") sentence[i] = sentence[i].upper() i += 1print ("new sentence = ", sentence)
And get the error: TypeError: 'str' object does not support item assignment
But then how else could I do this?
How can I find column values that are in all caps? Like
LastName = 'SMITH' instead of
Here is what I was trying...
SELECT * FROM MyTable WHERE FirstName = UPPER(FirstName)
I have these lines of text like:
"Suburb_Name": "Hazelwood","Suburb_Name": "Hazelwood North","Suburb_Name": "Heathcote","Suburb_Name": "Sulky",
I need to make the various names uppercase, like:
"Suburb_Name": "HAZELWOOD","Suburb_Name": "HAZELWOOD NORTH","Suburb_Name": "HEATHCOTE","Suburb_Name": "SULKY",
Is there a way of doing this? The file is rather long, 661630 lines.
Hi: I made a naive CPP program that revert case of text in windows clipboard, I edited the registry to add the shortcut on right click as
HK_CLASSES_ROOT > directory > background > shell > UPPERCASE > command > upperlower.exe -u
HK_CLASSES_ROOT > directory > background > shell > lowercase > command > upperlower.exe -l
The program works, but the issue is that each time I use it windows prompt briefly (flashes) a 'commend window'
Now: How can I prevent windows from flashing that command window?
So, i'm trying to make my elements in my lists uppercase, but i can't make the standard something.upper(), i'm guessing because of the lists in the lists. fx:
names = [['henry', 'mike'],'jones', 'kevin',['michael', 'simon']]
How do i do this?