Answer to Question #276209 in Python for Pallavi

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)))


1
Expert's answer
2021-12-06T14:04:44-0500
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS