Question: In python, str = ' 2 0 2 0 - 0 7 - 2 2 1 5 : 0 9 : 4 0 status

"In python,
str ='2020-07-2215:09:40 status installed linux-image-4.15.0-10 XG019-generic:amd644.15.0-109.110'
Change the following Regex expression,
m = re.search(r""installed ((.+):(.+)).*"", str)
print(""%d: %s""%(line_number, m.group(2)))
so that the program outputs:
2020-07-22: linux-modules-4.15.0-109-generic"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!