jeudi 1 juin 2017

How can one make an IF function to produce a response if it meets the correct string length?

This small piece of code is part of a much bigger piece, that I am working on using Tkinter. The premise of the coding is to have an input entered, but if it does not reach the minimum string amount, it will rejct the code.

if Type < len('abc'):
  output.insert(END, 'This is very short')

Len('abc') is supposed to give Type a minimum of 3 characters. How can I produce this function so it will reease a statement when the input does not reach the minimum amount of characters?

Aucun commentaire:

Enregistrer un commentaire