1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
import threading
import time
import translators as ts
import itertools
def trad(t):
u=ts.google(t,to_language='fr')
return u
class MonThread (threading.Thread):
def __init__(self, jusqua,num):
threading.Thread.__init__(self)
self.jusqua = jusqua
self.num = num
self.addy(self.jusqua,self.num)
def addy(self,e,E):
list2.append(1)
list2[e]=trad(E)
list2[e]=str(list2[e]).lower()
list2[e]=list2[e].replace(']',"")
list2[e]=list2[e].replace('[',"")
list2[e]=list2[e].replace("´","")
list2[e]=list2[e].replace("'","")
list2[e]=list2[e].replace('"',"")
word = input('type word here :')
list1=[]
list2=[]
num=""
list1=[[item] for item in set(''.join(x) for x in itertools.permutations(word))]
LLO=len(list1)
print("there is as much possibility:",LLO)
WW=[]
WM=0
WX = 0
while WM < LLO :
WW.append(1)
WW[WM] = MonThread(WM,list1[WM])
print(WM)
WM+=1
print(list1)
print(list2) |
Partager