//Use the code below to set min and max characters for an input
//grabbing element from the DOM
const username = document.getElementById('username');
function checkLength(input, min, max) {
if(input.value.length < min)
{//below can be applied to a field, etc
console.log(`${input.id} must be at least ${min} characters`)
}
else if(input.value.length > max){
console.log(`${input.id} must be less than ${max} characters`)
}
}
//call function
checkLength(username, 3, 15)
t = input("your text>>")
min_char = t[0]
max_char = t[0]
for item in t:
if item<min_char:
min_char = item
if item>max_char:
max_char = item
print(f"min_char: {min_char}")
print(f"max_char: {max_char}")