I am sending packets from one pc to other. I am using python socket socket.socket(socket.AF_INET, socket.SOCK_DGRAM  ). Do we need to take care of order in which packets are received ?
In ISO-OSI model layers below transport layer handle all packets communication. Do all ISO-OSI layers present in the program ? Or some of them present in operating system ? 
On localhost I get all packets in order. 
Will it make any difference over internet ?
SOCK_DGRAM means you want to send packets by UDP -- no order guarantee, no guarantee of reception, no guarantee of lack of repetition. SOCK_STREAM would imply TCP -- no packet boundary guarantee, but (unless the connection's dropped;-) guarantee of order, reception, and no duplication.  TCP/IP, the networking model that won the heart and soul of every live practitioned and made the Internet happen, is not compliant to ISO/OSI -- a standard designed at the drafting table and never really winning in the real world.
The Internet as she lives and breathes is TCP/IP all the way.  Don't rely on tests done on a low-latency local network as in ANY way representative of what will happen out there in the real world. Welcome to the real world, BTW, and, good luck (you'll need some!-).
Python socket programming and ISO-OSI model