Checking that a user input has four digits
IsobelBolter (2)

how do you check that a user input has four digits?

You are viewing a single comment. View All
Answered by TimothyAnderso1 (65) [earned 5 cycles]
View Answer
Lord_Poseidon (111)

There is more than one method. You could do number in range(1000,10000) or even math.floor(math.log(number,10))==3 or as Archie said, the inbuilt len to find out the length of a string