Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyperclip
- dec_box = [[127.46659851074219, 697.761474609375, 592.3056030273438, 969.1796264648438], [145.38204956054688, 241.7072296142578, 552.0755615234375, 409.4161376953125], [709.1004638671875, 240.0570831298828, 1254.04150390625, 516.4016723632812], [1489.12451171875, 341.7560119628906, 2032.9217529296875, 631.8690185546875], [932.1668090820312, 742.7733764648438, 1454.72119140625, 1049.021484375]]
- num = ['three', 'one', 'five', 'zero', 'nine']
- ary2 = []
- for x in range(len(dec_box)):
- ary2.append(dec_box[x][1])
- dict1 = {}
- for x in range(len(dec_box)):
- dict1[ary2[x]] = num[x]
- ary2.sort()
- # print(ary2)
- dict2 = {}
- for x in range(len(dec_box)):
- dict2[dict1[ary2[x]]] = ary2[x]
- dict3 = []
- for x in dict2:
- if x == "one":
- dict3.append(1)
- elif x == "two":
- dict3.append(2)
- elif x == "three":
- dict3.append(3)
- elif x == "four":
- dict3.append(4)
- elif x == "five":
- dict3.append(5)
- elif x == "siz":
- dict3.append(6)
- elif x == "seven":
- dict3.append(7)
- elif x == "eight":
- dict3.append(8)
- elif x == "nine":
- dict3.append(9)
- elif x == "ten":
- dict3.append(10)
- strval = ""
- for x in dict3:
- strval = strval + str(x)
- print(strval)
- pyperclip.copy(strval)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement