12345678910111213141516171819202122 |
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- # Write sentence as string
- sentence = "Je vois La Vie en rose... Tu vois Le Ciel en vert!"
- # Print sentence
- print("phrase originale:", sentence)
- new_letter = []
- words = sentence.split()
- # for each word
- for word in words:
- # iterate over letters of word
- for letter in word:
- new_letter.append(letter)
- #print(new_letter)
- print("phrase sans espaces:", "".join(new_letter))
|