string = "heLLo hOw are you toDay"
results = string.find("[A-Z]") <----- Here is my problem
string.lower().translate(table) <--- Just for the example.
>>>string
"olleh woh era uoy yadot"
#here i need to make the characters that where uppercase, be uppercase again at the same index number.
>>>string
"olLEh wOh era uoy yaDot"
i am need to find the index number of the uppercase characters in the string above, and get a list (or whatever) with the index numbers in order to use again on the string, to bring back the uppercased characters at the same index number.
maybe i can solve it the the re module, but i didn’t find it any option to give me back the index numbers.
hope it understandable, i have done a research but couldn’t find solution to it.
Thanks.
BTW, i am using python 3.X
You can do something along this line, just need to modify it a little bit and collect those start positions into an array etc: