Advertisement
BobMe

python thing

Feb 12th, 2020
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import time #Test here: https://repl.it/languages/python
  2.  
  3. while True:
  4. time.sleep(0.3)
  5. msg = input("cmd: ")
  6. length = len(msg)
  7. kek = 0
  8. kek2 = 0
  9. for i in range(length):
  10. if msg[i:i+1] == "/":
  11. kek = i
  12. break
  13. if kek != 0:
  14. for i in range(kek,length):
  15. if i > kek and msg[i:i+1] == "/":
  16. kek2 = i
  17. break
  18. word1 = msg[0:kek]
  19. word2 = msg[kek+1:kek2]
  20. word3 = msg[kek2+1:length]
  21. print(word1 + " | " + word2 + " | " + word3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement