Skip to content

Tag: string

Shift for uppercase letters

I am writing a program on shifting a word. My desired output should be a:f b:g c:h … y:d z:e A:F B:G C:H … Y:D Z:E But after running this code, my output is a:f b:g c:h … y:d z:e A:f B:g C:h … Y:d Z:e Seems isupper() function didn’t work here. Could you help with this based on my

Advanced string manipulation in Python

I’m trying to get only the value that are after the string 2021 from the following string: I need to get those 2 values separated (first one has to be 168088000000 and the second one has to be 61271000000 in this case). They have to be preceded by 2021 (and the result should give only the 2 numbers I me…

Remove duplicate substring at the start of the string

I would like to remomve duplicate substrings at the start of a string where a duplicate exists. I sort of have the logic working for the first row (see below) but am quite new to Python so am struggling to produce code which will apply the same logic for a rows in a larger dataset. Below is an example of:

How do you change a string that is already in the console?

I’m trying to make a typing thingy where you type what time delay you would like and what the string you want to output is and then it slowly types each letter: I just have one problem. I want the string to output in one line but each letter at a different time, but I can only make it so