Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to colour letters in python

print("yourtext") #If you print anything, as default you'll get white text and black background
print("33[{effect};{textcolour};{textbackground}myourtext") #this won't actually work, you need to change the "{}" by a number
"effect: 0 = none, 1 = bold, 2 = underline"
"textcolour 30 = black, 31 = red, 32 = green, 33 = yellow, 34 = blue, 35 = purple, 36 = cyan, 37 = white."
"textbackground = the same + 10

"Example"
print("33[1;32;40m Bright Green  
")
Comment

PREVIOUS NEXT
Code Example
Python :: python - find specific name in a df 
Python :: python random randint string 
Python :: python dictionary dynamic key 
Python :: python 3d array 
Python :: python3 shebang line 
Python :: algorithms for Determine the sum of al digits of n 
Python :: python file hashlib 
Python :: pyplot savefig 
Python :: virtualenv python2 
Python :: random int python 
Python :: Python program to implement linear search and take input. 
Python :: python look up how many rows in dataframe 
Python :: python if condition assignment in one line 
Python :: kivy button disable 
Python :: how to show a frequency distribution based on date in python 
Python :: pyplot python 
Python :: find min and max from dataframe column 
Python :: subtract number from each element in list python 
Python :: how to make exe from.py file 
Python :: how to add new column in csv file using pandas 
Python :: How to Merge train and Test dataset in python 
Python :: pandas data frame to list 
Python :: count consecutive values in python 
Python :: matplotlib vertical tick labels 
Python :: assert python 
Python :: python concatenate lists 
Python :: python use functions from another file 
Python :: bytearray to hex python 
Python :: python import graphviz 
Python :: convert plt image to numpy 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =