QuestionQ253

VerifiedComputer Programming and Python Fundamentals

What output should the following code produce?

print(chr(ord('p') + 3))  
Explanation

ord('p') returns the Unicode code point 112. Adding 3 produces 115, and chr(115) converts that code point to the character s.

Community Discussion

No comments yet. Be the first to start the discussion!