psbook solutions

সমস্যা ও সমাধান বই - ১ এর উপর অনুশীলন ( Practice code for Problem and Solutions Book - 1 by Mahbubul Hasan )

View the Project on GitHub

UVa 272 - TEX Quotes

Commit Time 15 Oct 2017 14:44

from sys import stdin

text = stdin.read().split('"')
new_text = ''

for i, part in enumerate(text):
    if(i != len(text)-1):
        new_text += part + ("''" if i & 1 else "``")
    else:
        new_text += part

print(new_text, end='')