I have written a for loop to display names in python idle as shown below.
1.SRA-D12-TY2-2017WW22.4.129
2.SRA-D12-TY2-2017WW27.5.168
3.SRA-D12-TY2-2017WW16.5.92
4.SRA-D12-TY2-2017WW20.2.115
5.SRA-D12-TY2-2017WW25.2.149
6.SRA-D12-TY2-2017WW29.5.188
7.SRA-D12-TY2-2017WW36.1.234
8.SRA-D12-TY2-2017WW31.3.201
The code I have written to display the above items is
for i in data.get('files'):
new_data = i.get('uri').strip('/')
platform_display = "{}.{}".format(count,new_data)
platform_dict[count] = new_data
count += 1
print platform_display
I want it to be displayed as
1.SRA-D12-TY2-2017WW36.1.234
2.SRA-D12-TY2-2017WW31.3.201
3.SRA-D12-TY2-2017WW29.5.188
etc in descending order
Please let me know how can I sort the names
'WW'and then parsing the right side as a float and sorting on thatsorted(..., reverse=True)?