I wanted to check if the characters of code are within 0-9 but I couldn't think of a less clunky way to write it

I tried just using

digits = "0123456789"

if code not in digits then
	return false

but that didn't work for some reason

I got the script to work by using this but is there a way to simplify it? I dont like the way it looks

if code[0] not in digits or code[1] not in digits or code[2] not in digits then
        return false

1 comment

0

how did you even get that syntax to work