samedi 16 juin 2018

How can i create multiple dictionaries for initial letters from a dictionary?

I want to create lists from a list. In the main list i have 1300+ dictionary words (most common) for English to Spanish. for example:

words = {"hablar":"to speak","reir":"to laugh","comer":"to eat"}

and 1300+ words like this. I do not want to seperate them manually for initials. I want to make a program to seperate them automatically like this;

    a_words = {words with a}
    b_words = {words with b}
    c_words = {"comer":"to eat"}
    .
    .
    .
    .
    .
    h_words = {"hablar":"to speak"}

my program will automatically create dictionaries per initial letters. And i will make a random selection function so when i run the program, it will show me a word in Spanish and i will type it in English so i will be practicing. Thanks for all your help.




Aucun commentaire:

Enregistrer un commentaire