Skip to content
DeepForgeby svx
All problems
MediumNLPnlp-102

Turkish-Aware Case Folding

Problem

Lowercase text using Turkish casing rules: uppercase dotted I (U+0130) becomes 'i' and uppercase dotless I becomes the dotless lowercase 'ı' (U+0131).

All other characters are lowercased normally.

Hint

Handle the two special I characters before falling back to lower().

Test cases

case 1
in: ["Istanbul"]
expected: "ıstanbul"
case 2
in: ["İstanbul"]
expected: "istanbul"
case 3
in: ["MIXED Case"]
expected: "mıxed case"
case 4
in: ["HELLO"]
expected: "hello"
case 5
in: [""]
expected: ""
Starter codePython
def case_fold_turkish(text):
    # Your code here
    pass

5 test cases · run your code against them in the editor