Question 112Asked in DSSSB TGT Computer Science, 7 Feb 2024, Shift 2 (12:30 PM)

Which of the following type conversion function in the Python language, is used to

Which of the following type conversion function in the Python language, is used to convert a character into an integer?
  1. Atuple ( )
  2. Bdict ( )
  3. Cset ( )
  4. Dord ( )
Show answerHide answer

Correct answer: (D) ord ( )

Explanation

ord() converts a character to its integer Unicode code, e.g. ord("A") = 65. tuple(), dict() and set() build collections.

From DSSSB TGT Computer Science PYQ, 7 Feb 2024, Shift 2 (12:30 PM)

This is question 112 of DSSSB TGT Computer Science PYQ, 7 Feb 2024, Shift 2 (12:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.