Question
What does re.sub(r'(\w+)', r'_\1_', 'hello world')
return?Solution
The re.sub() function replaces occurrences of a pattern. Here, (\w+) captures each word. In the replacement string r'_\1_', \1 refers to the content of the first (and only) capturing group. Thus, each word is wrapped with underscores.
Match the following:
What is the general average carbon/nitrogen ratio found in soils?
If an eight-legged, flat-bodied brown organism is found on your dog, what is the most likely identity of the organism?
The department of agriculture, revenue and commerce was set up in .............................?
TDN stands for:
The deterioration or loss of the productive capacity of the soils due to various reasons like human activity is called as ____
HD 2329 is a variety of:
PLAM is a computerized prediction system for ......................?Â
Muga culture is endemic to _____ and is the largest producer of the famous golden Muga silk in the world.
Match the following: