I need an example to understand this FOR LOOP concept

Currently working on: https://www.codecademy.com/courses/learn-python-3/projects/scrabble

I reached the bonus / optional problems below and i got stuck at the last one so i watched the youtube video. Their solution is simple and straight forward. You need to be able to accept .lower Letters in the list letters = {}

Problem request:

make your letter_to_points dictionary able to handle lowercase inputs as well

letters += [ letter.lower() for letter in letters ]

But i wanted to play around a bit and i dont know how to write this as a normal for loop method:

for letter in letters:

Cheers

Hi there.

I’m assuming that you want to change this:
letters += [ letter.lower() for letter in letters ]

from a list comprehension to a “regular” for loop?

In which case, just break down what’s happening on that line and then code those steps. The existing code is creating a new list of the letters, all in lowercase, by using a list comprehension. It then adds that new list to the existing one using the += operator.

In a “regular” for loop, we’d need to do the following:

  1. for each letter in letters… which we already know will be the opening line
    for letter in letters:

  2. Convert the letter to lowercase.

  3. Append it to the existing list.