Answers for "python color input"

0

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)
Posted by: Guest on June-13-2021

Python Answers by Framework

Browse Popular Code Answers by Language