Q:

Write a Python program to remove the nth index character from a nonempty string.

0

Write a Python program to remove the nth index character from a nonempty string.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def remove_char(str, n):
      first_part = str[:n] 
      last_part = str[n+1:]
      return first_part + last_part
print(remove_char('Python', 0))
print(remove_char('Python', 3))
print(remove_char('Python', 5))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now