-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path1239.py
More file actions
31 lines (26 loc) · 693 Bytes
/
Copy path1239.py
File metadata and controls
31 lines (26 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
while True:
try:
ph = input()
i = 0
b = 0
res = ''
for j in range(len(ph)):
if(ph[j] == '_'):
if(i == 0):
res += '<i>'
i = 1
else:
res += '</i>'
i = 0
elif(ph[j] == '*'):
if(b == 0):
res += '<b>'
b = 1
else:
res += '</b>'
b = 0
else:
res += ph[j]
print(res)
except EOFError:
break