#list = [ ["1 NWZ", "1 RWZ", "2 NWZ", "2 RWZ", "1E HZ", "1W HZ", "1-2EHZ", 2.0, "2W HZ", etc...]
#^
#["1 NWZ", "1W HZ", "3E FZ", "SNOK", "POK", 4.0, "1-2EHZ", "2E AK", "2W HZ", etc...]
#^
#["1 BW", "1AW AS"K, "3E FZ", "1BWAK", "POK", "TESTK", "1-2EHZ", "2E AK", 1.0, etc...] ]
#^
listed = [ ["1 NWZ", "1 RWZ", "2 NWZ", "2 RWZ", "1E HZ", "1W HZ", "1-2EHZ", 2.0, "2W HZ"],
["1 NWZ", "1W HZ", "3E FZ", "SNOK", "POK", 3.0, "1-2EHZ", "2E AK", "2W HZ"],
["1 BW", "1AW AS", "3E FZ", "1BWAK", "POK", "TESTK", "1-2EHZ", "2E AK", 1.0]]
def sortOnFloat(sublist):
return [v for v in sublist if isinstance(v, float)]
listed.sort(key=sortOnFloat)
for sublist in listed:
print sublist
I2xpc3QgPSBbIFsiMSBOV1oiLCAiMSBSV1oiLCAiMiBOV1oiLCAiMiBSV1oiLCAiMUUgSFoiLCAiMVcgSFoiLCAiMS0yRUhaIiwgMi4wLCAiMlcgSFoiLCBldGMuLi5dIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNeIAojWyIxIE5XWiIsICIxVyBIWiIsICIzRSBGWiIsICJTTk9LIiwgIlBPSyIsIDQuMCwgIjEtMkVIWiIsICIyRSBBSyIsICIyVyBIWiIsIGV0Yy4uLl0gCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjXiAKI1siMSBCVyIsICIxQVcgQVMiSywgIjNFIEZaIiwgIjFCV0FLIiwgIlBPSyIsICJURVNUSyIsICIxLTJFSFoiLCAiMkUgQUsiLCAxLjAsIGV0Yy4uLl0gXSAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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