Question #276209

text=r'''Everyone has the following fundamental freedoms:

    (a) freedom of conscience and religion;

    (b) freedom of thought, belief, opinion and expression, including freedom of the press and other media of communication;

    (c) freedom of peaceful assembly; and

    (d) freedom of association.'''


import re

pattern = X

print(len(re.findall(pattern,text)))


Expert's answer

import re




text=r'''Everyone has the following fundamental freedoms:
(a) freedom of conscience and religion;
(b) freedom of thought, belief, opinion and expression, including freedom of the press and other media of communication;
(c) freedom of peaceful assembly; and
(d) freedom of association.'''


pattern = 'x'


print(len(re.findall(pattern,text)))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS