View Single Post
  #37  
Old 13th March 2021, 04:42 AM
chook chook is offline
Member
 
Join Date: Jan 2019
Posts: 14
Default

Shaun: try colour like this?
a_res = **** "1st":'darkgreen', "2nd":'gold', "3rd":'blue', "4th":'purple' ****

colour = 'black'
if res in a_res:
colour = a_res[res]

key error happens if your key is not in the dictionary.
Reply With Quote