Answer help - Day 38 - 100DaysOfCode

I understand why the solution provided works, but what is missing in the approach below? I can’t figure out why it doesn’t also work. Thank you!

userSen = input("What sentence do you want to rainbow? > ")
for letter in userSen:
    if letter.lower() == "b":
      print(f"\033[0;34m{letter}", end="")
    elif letter.lower() == "g":
      print(f"\033[0;32m{letter}", end="")
    elif letter.lower() == "p":
      print(f"\033[0;35m{letter}", end="")
    elif letter.lower() == "y":
      print(f"\033[1;33m{letter}", end="")
    elif letter == " ":

A post was merged into an existing topic: Day 038 - Project 38 : Rainbow sentence generator