Update main.py

added key word escape function