Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 10 Online
OpenStudy (anonymous):

hey how can i replace 'l' at position 2 from string a='Hello' to produce 'Hexlo'. i used a.replace(a[2],'x') but it replaces all the l to x.

OpenStudy (anonymous):

, 1 after your 'x' char call.

OpenStudy (anonymous):

thanks i figured out later...

OpenStudy (anonymous):

Actually it should have been put ,1 after the literal parameter call 'x' - just correcting my self - glad you have it sorted :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!