I have the code below to stop people entering nothing or entering names with numbers. It works, but I would like to add a message each time someone enter numbers, but not when they enter nothing. How would I do this.
from tkinter import *
import tkinter.simpledialog
player_one_name=""
def createGUI():
global player_one_name
diceWindow = Tk()
while player_one_name=='' or player_one_name is None or not re.match("^[A-z]*$", player_one_name):
player_one_name=tkinter.simpledialog.askstring("Player Name","Please enter your name: ")
createGUI()