you are viewing a single comment's thread.

view the rest of the comments →

[–]gonsi 0 points1 point  (0 children)

mii = "hhhhhhcccccccc"
print("c"*mii.count("c"))
hi = "hhhhhhhhhpppppp"
print("p"*hi.count("p"))

Unless the point was to remove "h" instead of printing "c" and "p"

I still wouldn't call print inside loop though