Skip to content
Advertisement

Advanced string manipulation in Python

I’m trying to get only the value that are after the string 2021 from the following string:

JavaScript

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 mentioned above so for example if there is a value 2022 and others numbers they should not be taken).

The result should be a=168088000000 b=61271000000 both as strings.

Advertisement

Answer

I think you can get inspired by this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement