# Python numbers as strings

Asked 6 days ago, Updated 6 days ago, 0 views

If the data list is `[3,10,4,5]`
If this is the case

``````3->A
10->B
4->C
5->D
[A,B,C,D]
``````

Is there a way to change it to text when it is printed

python

2022-09-20 14:42

`````` print ("ABC placement distance is "", [math.fsum(arr1 + arr2 + arr3)/n]", "average" per picker, [[math.fsum(arr1 + arr2 + arr3)/no]", "move"
print ("ACB placement distance is "", [math.fsum(arr4 + arr5 + arr6)/n]], "".", "average per picker", [[math.fsum(arr4 + arr5 + arr6)/n/o]", "moving")
print ("BAC placement distance is "", [math.fsum(arr7 + arr8 + arr9)/n], "".", "average per picker", [[math.fsum(arr7 + arr8 + arr9)/n/o], "moving")
print ("BCA placement distance is "", [math.fsum(arr10 + arr11 + arr12)/n]], "".", "Average per picker", [math.fsum(arr10 + arr11 + arr12)/n/o]", "Move")
print ("CAB placement distance is "", [math.fsum(arr13 + arr14 + arr15)/n]], "".", "average per picker", [math.fsum(arr13 + arr14 + arr15) / n/o]", "Move")
print ("CBA placement distance is "", [math.fsum(arr16 + arr17 + arr18)/n]], "".", "average per picker", [[math.fsum(arr16 + arr17 + arr18) / n/o]", "Move")
print("ABMIXC placement distance is "", [[math.fsum(arr19 +arr20)/n]], "", "average per picker", [[math.fsum(arr19 +arr20)/no]], "move")
print("AMIXCB placement distance is "", [[math.fsum(arr21 +arr22)/n]], "", "average per picker", [[math.fsum(arr21 +arr22)/no]], "move")
print("BAMIXC placement distance is "", [[math.fsum(arr23 +arr24)/n]], "", "average per picker", [[math.fsum(arr23 +arr24)/no]", "move")
print("CAMIXB placement distance is "", [[math.fsum(arr25 +arr26)/n]], "", "average per picker", [[math.fsum(arr25 +arr26)/no]], "move")

data =[[math.fsum(arr1 + arr2 +arr3)/n],[math.fsum(arr4 + arr5 +arr6)/n],[math.fsum(arr7 + arr8 +arr9)/n],[math.fsum(arr10 + arr11 +arr12)/n],[math.fsum(arr13 + arr14 +arr15)/n],[math.fsum(arr16 + arr17 +arr18)/n],[math.fsum(arr19 +arr20)/n],[math.fsum(arr21 +arr22)/n],[math.fsum(arr23 +arr24)/n],[math.fsum(arr25 +arr26)/n]]
sorted_data = sorted(data)
print("Best Ranking", sorted_data)
``````

I've made this before. If I print this out, The optimal rankings are [[271.1066865802296], [294.2983617934121], [309.1016981601108], [335.8336838245576], [376.2574683889294], [397.5364561853031], [401.50896081556], [41.7836179458458]18553], and this way

I'd like to change the optimal ranking to [ABC, BAC, CAB...] but shouldn't that method have to be ordered?

2022-09-20 14:42

Popular Tags
python x 1174
android x 247
c x 235
java x 192
javascript x 106
mysql x 30
html x 27
node.js x 24
php x 21
list x 19