I'm playing with Python. I try to validate a variable value. Should be super simple but I'm struggling. Here are the req's:
- Value must have exactly 3 char = +49
- Value must have exactly the format = +49
I tried to loop through the string variable. I used a for loop. I also tried to save the values in an array and check the array later on.
def validateCountryCode(self):
val = ["1", "2", "3"]
i = 0
for val[i] in self.countryCode
print(val[i])
val[i] += 1
I would now start to check the array with an if-statement but I don't get to the point because it seems that I already went the wrong way.