So im trying to accept input of an RGB color values,which means they have to be integers within 0-255,such as:
123,245,230
but i want to make sure that they have formatted it correctly, so i'm taking the input as a string and im trying to force it into a list. my original solution was
colorList=colorListString.split(",") for i in range(3): colorList[i]=int(colorList[i]) colorMatrix+=[colorList]
but this doesn't make sure that there is always 3 values, so i complicated it to first make sure that the input was 3 values determined with
while colorListString.count(",") !=2: print("Color number ",x+1,": ") colorListString=input()
but now im running into the problem that i dont know how to make sure that the three values are indeed integers, and keep that neatly within the while loop