Python Forum
why does this happen?can it be bug?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why does this happen?can it be bug?
#1
>>> print(b"any text")

we have given an input in this way;

output >>> b'any text'


I got SynTaxError when I tried the letter "b" in other letters.
Reply
#2
Do you know what the "b" is for? There are a few string prefixes that denote different kinds of string literal. See the docs for what they are.

So no, I don't see a bug there. Also, don't you think if there was an obvious bug like that, it would have been spotted by now?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I am getting a NameError that is not defined and not sure why it happen rick0922 5 4,102 Jun-14-2021, 03:41 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020