shubhangi_1 0 Newbie Poster

I want to print the count N letters of string but it result in error can anybody help me?

import subprocess
variable = "making"
s = subprocess.Popen(("grep","-o -w","%s"%variable, "output.txt|wc -w"), stdout = subprocess.PIPE)
output = s.communicate()[0]
print(output)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.