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

Which of the following type of function used with strings in the Python language

Which of the following type of function used with strings in the Python language returns the character with the highest ASCII value?
  1. Alen ( )
  2. Bhvalue ( )
  3. Cmax ( )
  4. Dlong ( )
Show answerHide answer

Correct answer: (C) max ( )

Explanation

max() on a string returns the character with the highest ASCII/Unicode value, e.g. max("apple") gives "p". len() gives length; hvalue() and long() are not string functions.

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

This is question 105 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.