20 lines
490 B
Python
Executable File
20 lines
490 B
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
# this programme compare a text in french and its translation in englishe and liste the common words .
|
|
|
|
textFr ="j'ai fait le sport : le jogging"
|
|
textEn = "I do sport : jogging "
|
|
mots=textFr.split()
|
|
words=textEn.split()
|
|
# for each word in the line:
|
|
#for mot in mots:
|
|
# print the "mot"
|
|
#print(mot)
|
|
#for word in words:
|
|
# print the "word"
|
|
#print(word)
|
|
for word in words:
|
|
for mot in mots:
|
|
if word == mot :
|
|
print(word)
|