jeudi 26 octobre 2017

Python - function that changes one letter in a string [on hold]

I was wondering how to write a function that accepts one argument (a string), and returns the same string with one letter changed. So for instance: randomize(hello) would output 'hbllo'.

I was thinking about using list slicing but didn't really know where to start. Could anybody help me?




Aucun commentaire:

Enregistrer un commentaire