fork download
  1. def reverse(n):
  2. return ' '.join(x[::-1] if len(x) >= 5 else x for x in n.split())
  3.  
  4. print(reverse('abc abcdrd sdldslddldkd sdsldsdlsdkdsald'))
Success #stdin #stdout 0.01s 9992KB
stdin
Standard input is empty
stdout
abc drdcba dkdlddlsdlds dlasdkdsldsdlsds