Facebook
From İsmail Kalkan, 1 Month ago, written in Python.
Embed
Download Paste or View Raw
Hits: 122
  1. def reverse_string(input_string):
  2.     word = input_string.split()
  3.     reversed_string = ' '.join(reversed(word))
  4.     return reversed_string
  5.  
  6. string1 = "The weather is so sunny nowadays"
  7. string2 = "Life is so beautiful"
  8.  
  9. output1 = reverse_string(string1)
  10. output2 = reverse_string(string2)
  11.  
  12. print(output1)
  13. print(output2)