You have a tuple inside a tuple. So, you need the first element of the outer tuple, which is u_data[0]: the innermost tuple. And then you need the first element, which u_data[0][0]. To a float, therefore, to get an integer, you want to wrap it all in int(), which will lead us to:
int(u_data[0][0])
source
share