We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fabf789 commit 373a7fbCopy full SHA for 373a7fb
Strings/Mutations.py
@@ -4,12 +4,9 @@
4
Domain : Python
5
Author : Ahmedur Rahman Shovon
6
Created : 15 July 2016
7
+Updated : 25 October 2019
8
Problem : https://www.hackerrank.com/challenges/python-mutations/problem
9
'''
-# Enter your code here. Read input from STDIN. Print output to STDOUT
10
-s=raw_input()
11
-in_str_ar=raw_input().strip().split()
12
-pos=int(in_str_ar[0])
13
-c=in_str_ar[1]
14
-final_str=s[:pos]+c+s[pos+1:]
15
-print final_str
+def mutate_string(string, position, character):
+ return string[:position]+character+string[position+1:]
+
0 commit comments