DEV Community

Discussion on: Daily Challenge #15 - Stop gninnipS My sdroW!

Collapse
 
aadibajpai profile image
Aadi Bajpai • Edited

Python one-liner:
for x in input().split(): print(x[::1]*(len(x)<5) or x[::-1], end=' ')

65 chars at most :)

Or,
print(*map(lambda x: x[::1]*(len(x)<5)or x[::-1], input().split()))

Also 65 at most :)