I am trying to create a code that takes in user input and prints it out in a different color of the user's choice. When I run the code, the if statement for the color choices gets skipped. Here is the code:
from termcolor import colored
while True:
try:
print("Colors = grey, red, green, yellow, blue, magenta, cyan, white")
Colors = ['grey', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']
print(colored(input("Type Something: "), input("Enter a Color: ")))
except ValueError:
print("Not A Valid Color")
continue
else:
break
while True:
if input("Enter a Color: ") == Colors:
print("Not a Valid Color")
else:
break
Does anyone know how to fix it?