Advertisement
paster442

nothing

Aug 29th, 2021
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.08 KB | None | 0 0
  1. users = '''DOKDI
  2. DUDIK
  3. LARA
  4. Luli
  5. NETA789
  6. amitaikop
  7. angga
  8. anita100
  9. ardoron
  10. asma_malak
  11. benam
  12. brawfab
  13. cazc
  14. chshir
  15. crami
  16. ctownjice
  17. daltonjakob
  18. dangphu
  19. daria
  20. dial
  21. dice
  22. diegoms
  23. dislilgirlelmoxP
  24. eR_ToNio
  25. eliman
  26. emilg
  27. ercizhu
  28. fisher
  29. frankj
  30. gald
  31. galgal1
  32. grace325
  33. gunlove80
  34. hannakatherine
  35. imogen
  36. jaygirlie
  37. jb_irie
  38. jimmyroa
  39. jordanroberts
  40. juange
  41. jucazero
  42. justint
  43. kalapola
  44. lalunaesmilugar
  45. libana
  46. lilmissmoe
  47. litep
  48. m0azam
  49. madsam
  50. maplezdragon
  51. meraj07
  52. minazuki
  53. mosgal
  54. moshech1
  55. naheel
  56. nate123
  57. negra
  58. netanel
  59. noac
  60. noaca
  61. nofar
  62. o_kleef
  63. ori
  64. orpinto
  65. pauly
  66. radir
  67. reginamim
  68. rotem
  69. runar
  70. scarface
  71. shenhav
  72. testaccount1234
  73. vhamlett2008
  74. viocan
  75. volcomhalo
  76. yaffa18
  77. yahv
  78. yan_galy
  79. zion100
  80. zpy
  81. zshankweiler12'''.splitlines()
  82.  
  83. from requests import get
  84.  
  85. ids = dict()
  86. for user in users:
  87.     ids[user] = get(f"https://api.scratch.mit.edu/users/{user}/").json()["id"]
  88.  
  89. sorted_dict = dict()
  90. sorted_keys = sorted(ids, key = ids.get)
  91.  
  92. for w in sorted_keys:
  93.     sorted_dict[w] = ids[w]
  94.  
  95. ids = sorted_dict
  96.  
  97. for i in ids:
  98.     print(str(i) + ": " + str(ids[i]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement