You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
234 B
Python

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