python threading kill thread code example
Example 1: python kill script
import sys
sys.exit()
Example 2: python terminate thread
# You can do it the same way as ending any process
# Just get out of the loop with a break or have an if-statement that
# triggers the code to jump to the end ;)