Python string prefix

string prefix

meaning

  • u stands for unicode and can store Chinese characters.
  • b for bytes, can not store Chinese.
  • r represents raw and does not recognize escape characters.
  • f format.

Use

print(r"tes\nt")

Read More: