Python has already gained it's momentum among IoT developers as it offers readability with syntax without compromising on syntax. In today's era, language doesn't really matter any more when it comes to IoT, ease of writing the code efficiently matter. Large number of available open-source libraries and ability to get more things done with fewer lines of code is an added plus. Python's clean syntax and one to one mapping of it's data built-in structure -dict- to JSON are added advantages. If your application works with database or communicates with JSON data, Python is the right choice. Python is the choice of language for Raspberry Pi, one of the most popular micro controllers in the market. The micro Python is another micro controller optimized for using Python. Few of the advantages of using python includes

Very simple language to learn and is easy to implement and deploy.

It is portable, expandable and embeddable and hence it support most of the single board computers irrespective of operating system and architectureHuge developer community support

Few python libraries we used in IoT are:

mraa - mraa is GPIO library for most single board computers that supports Python. The advantage of mraa is that it support most of the devices having GPIO. Since it is written in a high level language, reading or writing to pin is just one liner.

import tensorflow as tf
# Create a Constant op
# The op is added as a node to the default graph.
#
# The value returned by the constructor represents the output
# of the Constant op.
hello = tf.constant('Hello, TensorFlow!')
# Start tf session
sess = tf.Session()
# Run the op
print(sess.run(hello))