Day 7

Day 7 was spend building a hangman game. This needed some lists to be defined and importing lists from other files. I changed the example up a bit after I found that with enumerate(var) you can get the index of a list for a for loop. The game itself can be played here:

for index, var in enumerate(list):

with this it was easier to determinate the right placement of the correct letters.

I also found someone else who is in exact the same stage as I am doing the 100 days of python course:

Not a lot of notes:

var_name = [] defines list

for index, var_name in enumerate(other_var): gives both the var you want and the index where it is placed

import from other_file imports lists from other py files


Comments are closed.