I used following code to descending the degree value of a network, using networkx. Now I want to select only the fist value of the iteration whithin the same for loop. code as follows:
for i in sorted(G.degree, key=lambda x: x[1], reverse=True):
list_id=(i[0])
print(list_id)
Output gives as follows:
264
32
19
4
101
15
Could you please tell me a way to select only the first value of this iteration, (i.e., 264)