A Compilation Error is a special type of error
that occurs while using Python as Source
Code. The main reason behind this error is that python is an interpreted
language. So, the online judge rather than interpreting it compiles the
code and hence the error occurs.
The best approach to tackle these kind of problems is either use a compilation
command or convert the program in single line
using the single function containing the whole program For.e.g.,
Program to convert a character in LowerCase
at a specified place.
def mains(): //Driver Function
n,K=input().split()
n=int(n)
K=int(K)
S=input()
print(S[:(K-1)]+chr(ord(S[K-1])+32)+S[(K):])
mains()
Input:
4 3
TEAM
Output:
TEaM
Hope this articles helps you a lot, but if the problem
persists, then comment below for further solutions.
Thank You,
Tech Know
Comments
Post a Comment