0

I take all rows from Redis Set using query:

all = r.smembers("apps")

Then I do:

for url in all:
   print(url)

In output print console I get:

b'https://go.com/e/s/details?id=meinepilze.mp\r\n'

What is symbol b in the beginning of line?

How can I get clear link?

Michael Armes
  • 1,056
  • 2
  • 17
  • 31
Griboedov
  • 413
  • 1
  • 6
  • 12

1 Answers1

2

It's a bytes object or better a 'not' decoded string. If you want a simple str just use

>>> b'string'.decode('utf-8')
'string'

for your case it would be

for url in all:
    print(url.decode('utf-8'))
Patrick Abraham
  • 208
  • 2
  • 10