code for xbee full duplex communicatuon

Please provide me

The Digi XBee is a Half duplex product.

You can use only SPI protocol in full duplex mode.|Serial%20communications|SPI%20operation|_____3

As was said by mvut, the deivce is a half duplex device.
So you can only do Half Duplex with MicroPython. Do you want to transmit and receive to and from a TCP/IP server as a TCP/IP client? or the serial port? or Full Duplex SPI?