Q. Which function is used to get the ASCII value of a character in Python?

  • (A) ascii()
  • (B) ord()
  • (C) char()
  • (D) chr()
πŸ’¬ Discuss
βœ… Correct Answer: (B) ord()
Explanation: The `ord()` function returns the ASCII/Unicode value of a character. Example: `ord('A') = 65`.
Explanation by: Rati Dubey
The `ord()` function returns the ASCII/Unicode value of a character. Example: `ord('A') = 65`.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
63
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
86%
Success Rate