Hi @kowshik1729 ,
Yes, you can do Multi Thread in Raspberry Pi using python and note that different threads do not actually execute at the same time: they merely appear to.
We can easily implement simple threads using threading module. I'll show you some example of how actually it works.
Example :
I was trying to blink two LED's at the same time, for that I created a function that does the blink infinitely using while(True) .
import RPi.GPIO as GPIO
import time
Rled = 12
Bled = 6
GPIO.setmode(GPIO.BCM)
GPIO.setup(Rled,GPIO.OUT)
GPIO.setup(Bled,GPIO.OUT)
def blue():
while True:
print "LED BLUE is ON"
GPIO.output(Bled,GPIO.LOW)
time.sleep(1)
print "LED BLUE is OFF"
GPIO.output(Bled,GPIO.HIGH)
time.sleep(1)
def red():
while True:
print "LED RED is ON"
GPIO.output(Rled,GPIO.LOW)
time.sleep(1)
print "LED RED is OFF"
GPIO.output(Rled,GPIO.HIGH)
time.sleep(1)
blue()
red()
Output :

Video : https://www.youtube.com/watch?v=AypMEQFpEWo&feature=youtu.be
since we are using the infinity loop for both methods, the blue() will not stop and red() will not invoke either.
In these scenarios, we can use multithread both function without waiting for another , let's try.
import RPi.GPIO as GPIO
import time
import threading
Rled = 12
Bled = 6
GPIO.setmode(GPIO.BCM)
GPIO.setup(Rled,GPIO.OUT)
GPIO.setup(Bled,GPIO.OUT)
def blue():
while True:
print "LED BLUE is ON"
GPIO.output(Bled,GPIO.LOW)
time.sleep(1)
print "LED BLUE is OFF"
GPIO.output(Bled,GPIO.HIGH)
time.sleep(1)
def red():
while True:
print "LED RED is ON"
GPIO.output(Rled,GPIO.LOW)
time.sleep(1)
print "LED RED is OFF"
GPIO.output(Rled,GPIO.HIGH)
time.sleep(1)
t1 = threading.Thread(target=blue)
t2 = threading.Thread(target=red)
t1.start()
t2.start()
Output :

Video : https://www.youtube.com/watch?v=HMKYzgdNwd8&feature=youtu.be
with the help threading module we can simply run both methods at the same time (how we feel).
I think you got your answer. also, keep in mind to avoid race condition and deadlock while multithreading.