Guest User

Untitled

a guest
Apr 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. randompassword = rd.randint(1, 5)
  2. print(randompassword)
  3. cursor.execute("SELECT password FROM testtable")
  4. rows = cursor.fetchone()
  5. row2 = cursor.fetchone()
  6. row3 = cursor.fetchone()
  7. row4 = cursor.fetchone()
  8. row5 = cursor.fetchone()
  9. if randompassword == 1:
  10. user_password = row
  11. elif randompassword == 2:
  12. user_password = row2
  13. elif randompassword == 3:
  14. user_password = row3
  15. elif randompassword == 4:
  16. user_password = row4
  17. else:
  18. user_password = row5
  19. print(user_password)
Add Comment
Please, Sign In to add comment