0

I'm new to programming and i'm trying to receive emails using kopeechka and then verify. (I'm using python)

This is what I get from a request: OK|1200495871|blahblahblah@hotmail.com
I'm looking to separate everything into their own little values, for example: Status (Ok or Error), ID (the numbers, they can change though), and email (the email address)

2xmonth
  • 11
  • 1
  • Is that basically a string with `|` as a separator/delimiter? Have you checked [`str.split`](https://docs.python.org/3/library/stdtypes.html#str.split)? – Gino Mempin Feb 04 '22 at 05:12
  • `x.split('|')` is your first step. – Tim Roberts Feb 04 '22 at 05:13
  • Sort of, is it possible to make the 3 results become their own variables that I then can return? – 2xmonth Feb 04 '22 at 05:24
  • `.split` returns a list, and then you can just [unpack the list into variables](https://stackoverflow.com/q/34308337/2745495). In the linked duplicate, see the answer: https://stackoverflow.com/a/54987777/2745495 – Gino Mempin Feb 04 '22 at 09:03

0 Answers0