Thanks for your immediate reply. But, can you give a complete code without if condition.
posted 6 years ago
Which bit are you having a problem with ? Put that line of code in a try/catch block, add a couple of print statements and you're done. Give it a try. You'll learn more by trying it yourself than having the code given to you.