')[1] result = ratingPart.partition("')[1] result = ratingPart.partition(b"<span")[0].strip() return result print(getZacksRating('AAPL')) But it getting printed as below: print(getZacksRating('AAPL')) b'Strong Buy' I don't wish to see the b' ' in my output. Just want to see strong Buy being printed. Select the correct answer from above options