Anonymous user
Rosetta Code/Count examples: Difference between revisions
added python and clarifed
No edit summary |
(added python and clarifed) |
||
Line 5:
Output:
<lang>100 doors: 20 examples.
...
Total: X examples.</lang>
=={{header|Python}}==
Line 29 ⟶ 27:
y = y.lower()
tasks[i] = y.count("{{header|")
print i.replace("_"," ") + ": " + str(tasks[i]) + " examples."
print "Total: " + str(sum(tasks.values())) + " examples."</lang>
|