Python · Strings, Bytes & Formatting

What do these evaluate to? ``` ord("A") chr(97) ```

Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.

Get it on App StoreGet it on Google Play

This is one card from the KnowCard library — thousands more across SAP, Linux, Python and more. In the app you get the answer, AI explanations, and cards that come back right before you would forget them. Free to start on iOS, Android or the web.

More in Strings, Bytes & Formatting

What does this print? ``` print(f"{3.14159:.2f}") ```
What does this print? ``` s = "hello" s.replace("l", "L") print(s) ```
Does calling s.upper() (or .strip(), .replace(), etc.) modify the string s in place?
What does this raise or print? ``` print("P" + b"ython") ```
What does this raise? ``` b = b"Püthøn" ```
You have str text and need to send it over a byte-oriented channel (network/file). Which direction is encode vs decode?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play