python color input

Solutions on MaxInterview for python color input by the best coders in the world

showing results for - "python color input"
Elia
14 Aug 2016
1from colorama import init
2from termcolor import colored
3 
4init()
5 
6def computer_prompt():
7    return (colored('Computer: ', 'green', 'on_blue'))
8def user_prompt():
9    return (colored('User: ', 'yellow', 'on_blue'))
10 
11print(computer_prompt()+'Please enter a word.')
12 
13word = input(user_prompt()+('?: '))
14 
15print(word)
16