#Python 3, (削除) 195 (削除ここまで)(削除) 169 (削除ここまで)(削除) 168 (削除ここまで) 166 bytes
Python 3, (削除) 195 (削除ここまで)(削除) 169 (削除ここまで)(削除) 168 (削除ここまで) 166 bytes
Thanks to @TrangOul for -2 bytes!
How didn't I see that I could have golfed that down before?
x=__import__('string').ascii_letters;y,z=x[26:],x[:26];a,b=y[::-1],z[::-1];print(''.join(b[z.index(i)]if i in b else a[y.index(i)]if i in a else i for i in input()))
(sorta) ungolfed:
x = __import__('string').ascii_letters;
y, z = x[26: ], x[: 26];
a, b = y[::-1], z[::-1];
print(''.join(b[z.index(i)]
if i in b
else a[y.index(i)]
if i in a
else i
for i in input()
))
#Python 3, (削除) 195 (削除ここまで)(削除) 169 (削除ここまで)(削除) 168 (削除ここまで) 166 bytes
Thanks to @TrangOul for -2 bytes!
How didn't I see that I could have golfed that down before?
x=__import__('string').ascii_letters;y,z=x[26:],x[:26];a,b=y[::-1],z[::-1];print(''.join(b[z.index(i)]if i in b else a[y.index(i)]if i in a else i for i in input()))
(sorta) ungolfed:
x = __import__('string').ascii_letters;
y, z = x[26: ], x[: 26];
a, b = y[::-1], z[::-1];
print(''.join(b[z.index(i)]
if i in b
else a[y.index(i)]
if i in a
else i
for i in input()
))
Python 3, (削除) 195 (削除ここまで)(削除) 169 (削除ここまで)(削除) 168 (削除ここまで) 166 bytes
Thanks to @TrangOul for -2 bytes!
How didn't I see that I could have golfed that down before?
x=__import__('string').ascii_letters;y,z=x[26:],x[:26];a,b=y[::-1],z[::-1];print(''.join(b[z.index(i)]if i in b else a[y.index(i)]if i in a else i for i in input()))
(sorta) ungolfed:
x = __import__('string').ascii_letters;
y, z = x[26: ], x[: 26];
a, b = y[::-1], z[::-1];
print(''.join(b[z.index(i)]
if i in b
else a[y.index(i)]
if i in a
else i
for i in input()
))
#Python 3, (削除) 195 (削除ここまで) (削除) 169 (削除ここまで) (削除) 168 (削除ここまで) 166 bytes
Thanks to @TrangOul @TrangOul for -2 bytes!
How didn't I see that I could have golfed that down before?
x=__import__('string').ascii_letters;y,z=x[26:],x[:26];a,b=y[::-1],z[::-1];print(''.join(b[z.index(i)]if i in b else a[y.index(i)]if i in a else i for i in input()))
(sorta) ungolfed:
x = __import__('string').ascii_letters;
y, z = x[26: ], x[: 26];
a, b = y[::-1], z[::-1];
print(''.join(b[z.index(i)]
if i in b
else a[y.index(i)]
if i in a
else i
for i in input()
))
#Python 3, (削除) 195 (削除ここまで) (削除) 169 (削除ここまで) (削除) 168 (削除ここまで) 166 bytes
Thanks to @TrangOul for -2 bytes!
How didn't I see that I could have golfed that down before?
x=__import__('string').ascii_letters;y,z=x[26:],x[:26];a,b=y[::-1],z[::-1];print(''.join(b[z.index(i)]if i in b else a[y.index(i)]if i in a else i for i in input()))
(sorta) ungolfed:
x = __import__('string').ascii_letters;
y, z = x[26: ], x[: 26];
a, b = y[::-1], z[::-1];
print(''.join(b[z.index(i)]
if i in b
else a[y.index(i)]
if i in a
else i
for i in input()
))
#Python 3, (削除) 195 (削除ここまで) (削除) 169 (削除ここまで) (削除) 168 (削除ここまで) 166 bytes
Thanks to @TrangOul for -2 bytes!
How didn't I see that I could have golfed that down before?
x=__import__('string').ascii_letters;y,z=x[26:],x[:26];a,b=y[::-1],z[::-1];print(''.join(b[z.index(i)]if i in b else a[y.index(i)]if i in a else i for i in input()))
(sorta) ungolfed:
x = __import__('string').ascii_letters;
y, z = x[26: ], x[: 26];
a, b = y[::-1], z[::-1];
print(''.join(b[z.index(i)]
if i in b
else a[y.index(i)]
if i in a
else i
for i in input()
))
#Python 3, (削除) 195 (削除ここまで) (削除) 169 (削除ここまで) 168(削除) 168 (削除ここまで) 166 bytes
Thanks to @TrangOul for -2 bytes!
How didn't I see that I could have golfed that down before?
x=__import__('string').ascii_letters;y,z=x[26:],x[:26];a,b=y[::-1],z[::-1];print(''.join([b[zb[z.index(i)]if i in b else a[y.index(i)]if i in a else i for i in input()]))
(sorta) ungolfed:
x = __import__('string').ascii_letters;
y, z = x[26: ], x[: 26];
a, b = y[::-1], z[::-1];
print(''.join([b[zb[z.index(i)]
if i in b
else a[y.index(i)]
if i in a
else i
for i in input()
]))
#Python 3, (削除) 195 (削除ここまで) (削除) 169 (削除ここまで) 168 bytes
How didn't I see that I could have golfed that down before?
x=__import__('string').ascii_letters;y,z=x[26:],x[:26];a,b=y[::-1],z[::-1];print(''.join([b[z.index(i)]if i in b else a[y.index(i)]if i in a else i for i in input()]))
(sorta) ungolfed:
x = __import__('string').ascii_letters;
y, z = x[26: ], x[: 26];
a, b = y[::-1], z[::-1];
print(''.join([b[z.index(i)]
if i in b
else a[y.index(i)]
if i in a
else i
for i in input()
]))
#Python 3, (削除) 195 (削除ここまで) (削除) 169 (削除ここまで) (削除) 168 (削除ここまで) 166 bytes
Thanks to @TrangOul for -2 bytes!
How didn't I see that I could have golfed that down before?
x=__import__('string').ascii_letters;y,z=x[26:],x[:26];a,b=y[::-1],z[::-1];print(''.join(b[z.index(i)]if i in b else a[y.index(i)]if i in a else i for i in input()))
(sorta) ungolfed:
x = __import__('string').ascii_letters;
y, z = x[26: ], x[: 26];
a, b = y[::-1], z[::-1];
print(''.join(b[z.index(i)]
if i in b
else a[y.index(i)]
if i in a
else i
for i in input()
))