Skip to content

Instantly share code, notes, and snippets.

@azmfaridee
Created July 5, 2013 00:31
Show Gist options
  • Save azmfaridee/5930959 to your computer and use it in GitHub Desktop.
Save azmfaridee/5930959 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# coding=utf-8
# -*- encoding: utf-8 -*-
import sys, codecs, copy, commands;
sys.stdin = codecs.getreader('utf-8')(sys.stdin);
sys.stdout = codecs.getwriter('utf-8')(sys.stdout);
sys.stderr = codecs.getwriter('utf-8')(sys.stderr);
c = sys.stdin.read(1);
printo = True;
while c: #{
if c == '<': #{
printo = False;
c = sys.stdin.read(1);
continue;
elif c == '>': #{
printo = True;
c = sys.stdin.read(1);
continue;
#}
if printo == True: #{
sys.stdout.write(c);
#}
c = sys.stdin.read(1);
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment