This is how we get the device name using blocks
But I need to find the way to code in micropython to find the same.
I have tried the following:
from microbit import *
while True:
basic.show_string(control.device_name())
But this throws an error!