ProgrammingVery hardProduct-company MCQ pattern

What is printed?

What is printed?
print(int('١٢٣') + 1, 'ß'.upper(), 'Dž'.lower(), len('ß'.upper()))
  1. A. 124 ß dž 2
  2. B. 124 SS dž 2
  3. C. 123 SS dž 1
  4. D. 124 SS dž 1

Correct answer: B. 124 SS dž 2

int() accepts any Unicode decimal digits, so Arabic-Indic digits give 123. 'ß'.upper() becomes the two-character 'SS', and the digraph 'Dž' lowercases to 'dž'.

More Python Programming questions

Exams that ask this topic