syntax error in python due to whitespaces i think
<p>I am still confused in the way of writting a python code as i am used to java codes with brakets and i cant fully understand the indentation concept. So this is a code that produces a syntax error so any one can help please ? Thank You in advance</p>

<pre><code>def SendSMS2 (phone_number,sms_text):

print 'made it to def' 
res = MDM.send('AT+CMGS='+ phone_number + '\r',5)
n=0
while n &lt; 20:
    res=MDM.receive(1)
    if res.find("&gt;") &gt;-1:
        print n
        break
        else:
            n = n +1

res = MDM.send(sms_text, 10)
if res != -1:
    print 'Text sent ok'

res = MDM.sendbyte(0x1a,10)
n=0
while n &lt; 20:
    res=MDM.receive(1)
    if res.find("+CMGS") &gt;-1:
        print n
        break
        if res.find("ERROR")&gt;-1:
            print 'sms ok'
            else:
                print 'not good' 
                else:
                    n = n +1


print 'def completed *******************'
</code></pre>
