Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python color input

from colorama import init
from termcolor import colored
 
init()
 
def computer_prompt():
    return (colored('Computer: ', 'green', 'on_blue'))
def user_prompt():
    return (colored('User: ', 'yellow', 'on_blue'))
 
print(computer_prompt()+'Please enter a word.')
 
word = input(user_prompt()+('?: '))
 
print(word)
Source by python-forum.io #
 
PREVIOUS NEXT
Tagged: #python #color #input
ADD COMMENT
Topic
Name
8+1 =