title: how to stop one function when the other one stops on python
body: <p>i've a working function which stops when the user writes exit, but i also have another function which doesn't stop so cmd just keeps staying open and won't close like it should as the other function keeps changing the cmd text color </p>
  
  <pre><code>import os,webbrowser,time,random,sys
  from threading import Thread 
  
  def fun1():
      Q=1
      while Q==1:
          print ('would you like to:')
          print('1.launch an applcation')
          print('2.browse the internet')
          print('========================================')
          bruv=input('your answer: ')
          if bruv in ('1','launch','launch app','launch an application'):
              print('========================================')
              print('what app would you like to open?')
              print('========================================')
              x=input('your answer: ')
              if x not in ('word'):
                  y=x+'.exe'
                  os.startfile(y)
              else:
                  z='win'+x
                  os.startfile(z)
          if bruv in ('2','browse the internet','browse','browse internet'):
              print('========================================')
              print ('where would you like to go?')
              print('========================================')
              p=input('your answer: ')
              p='www.'+p+'.com'
              webbrowser.open(p)
              print('========================================')
              print ('ok')
          print('========================================')
          print ('wanna continue?')
          if input() in ('exit','no','quit','nope','close'):
              print('========================================')
              print ('ok! thanks for using my bot!')
              print('========================================')
              time.sleep(1)
              Q+=1
              countdown=3
              while countdown&gt;=0:
                  if countdown!=0:
                      print (countdown)
                      time.sleep(1)
                      countdown-=1
                  else:
                      sys.exit()
  
  def fun2():
      what=1
      while what==1:
          os.system('color E')
          time.sleep(0.2)
          os.system('color A')
          time.sleep(0.2)
          os.system('color C')
          time.sleep(0.2)
          os.system('color B')
          time.sleep(0.2)
          os.system('color D')
          time.sleep(0.2)
      else:
          sys.exit()
  
  t1=Thread(target=fun1)
  t2=Thread(target=fun2)
  
  t1.start()
  t2.start()
  </code></pre>
  
  <p>In this code fun2 keeps rolling changing the color and wont close CMD 
  also i know this code is pretty bad i'm just starting python.</p>