Answers for "python b before string"

2

python b before string

# It means it's a byte string.
# Which means it'll just print b'string' if you try to print it out
string = b'Random string'
print(string)
string_without_b = string.decode()
print(string_without_b)
Posted by: Guest on August-25-2020

Python Answers by Framework

Browse Popular Code Answers by Language