def capitalize_first_i(s, i):
return " ".join(word[:i].capitalize() + word[i:].capitalize() for word in s.split())
s = "python isan interpreted general purpose programming language"
print(capitalize_first_i(s, 2))
'''
run:
PyThon IsAn InTerpreted GeNeral PuRpose PrOgramming LaNguage
'''