Пример #1
0
def dictionary() :
        list_of_everything = run()
        word_list = []
        for i in range(len(list_of_everything)) :
                word_list.append(list_of_everything[i][0][0])
        print(word_list)
        while(1) : 
                word = input('enter a word : ')
                if(word in word_list) :
                        print('exists')
                elif(word == 'exit') :
                        print('exiting')
                        print('-----------------------------------')
                        print()
                        main()
                else :
                        print('word not available')
Пример #2
0
		word_list_.append(word_list)
		word_list = []

	return_word_list = []
	for i in range(len(word_list_)) : 
		return_word_list_ = []
		for j in range(len(word_list_[i])) : 
			words = words_from_string(word_list_[i][j])
			for k in range(len(words)) : 
				return_word_list_.append(words[k])
		return_word_list.append(return_word_list_)

	return_word_list_ = []
	for list_ in return_word_list : 
		words_ = []
		for i in range(2,len(list_)) : 
			words_.append(list_[i])
		return_word_list_.append(words_)

	print('done crawling')
	return(return_word_list_)

def append_to_tuple(tuple_,word) : 
	list_ = []
	for i in range(len(tuple_)) : 
		list_.append(tuple_[i])
	list_.append(word)
	return(tuple(list_))

build_word_dictionary(run())