fork download
  1. import sys
  2.  
  3. for line in sys.stdin:
  4. trimmed = line.strip()
  5. if len(trimmed) > 2 and trimmed[0] == '=' and trimmed[-1] == '=':
  6. print(trimmed[1:-1])
  7. else:
  8. print line.rstrip()
  9.  
Success #stdin #stdout 0.08s 10872KB
stdin
=== a sample header ===
===== a deeper header =====
nothing

      === two ===
== zz ==
stdout
== a sample header ==
==== a deeper header ====
nothing

== two ==
= zz =