colors_list = []
while True:
user_input = input("Enter a color to add to the list(or type 'done' to finish): ")
if user_input.lower() == 'done':
break
colors_list.append(user_input)
print('Here is the list:')
print(colors_list)
< /code>
while true:
user_input = input («Введите цвет:»)
, если зеленый в цветах_листе:
print («Да!>
Подробнее здесь: https://stackoverflow.com/questions/795 ... -again-aft
Почему я все еще получаю: «Вы не дали мне достоверного значения, попробуйте еще раз! После входа в правильный цвет? ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение