- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathspin_words.py
More file actions
Latest commit
18 lines (13 loc) · 469 Bytes
/
Copy pathspin_words.py
File metadata and controls
18 lines (13 loc) · 469 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: utf-8 -*-
"""
Programa desarrollado por el Licenciado César Cordero Rodríguez.
Bajo licencia GPLv3.
Puede ser modificado, copiado y distribuido.
Se desarrolló con fines educativos.
"""
# Words with more than 4 letters, should be spinned, in a sentence
# IN: Hi and Welcome
# OUT: Hi and emocleW
defspin_words(sentence):
list_words=sentence.split(' ')
return' '.join([l[::-1] iflen(l) >=5elselforlinlist_words])