Skip to main content

Posts

Showing posts with the label Capitalize! Hackerrank Solution Python

Capitalize! Hackerrank Solution Python

 Capitalize! Hackerrank Solution Python For Explanation Watch Video:: Code: #!/bin/python3 import  math import  os import  random import  re import  sys # Complete the solve function below. def  solve(s):                                for x in s[:].split():         s = s.replace(x,x.capitalize())      return s if  __name__ ==  '__main__' :     fptr =  open (os.environ[ 'OUTPUT_PATH' ],  'w' )     s =  input ()     result = solve(s)     fptr.write(result +  '\n' )     fptr.close()