python string replace in python 3.x

Python String replace() Method There are two ways for replacing a String for python 2.x and also 3.x, use str.replace(). The replace() method in python 3 is used simply. Example for a string replace: or calling the method replace() of  <class ‘str’> in python 3.x: Notes from Python Docs: Method 1: use builtin str’s replace -> str.replace(strVariable, old,… Continue reading python string replace in python 3.x

how to split a string in python

How to split a string into a list of characters in Python?Answer is: You need Lists. Docs: http://docs.python.org/library/functions.html#list You take the string and pass it to list() or You can also do it in this very simple way without list(): If you want to process your String one character at a time. you have various… Continue reading how to split a string in python

python yield keyword

What does the “yield” keyword do in python? First of all you must to understand what generators [ Generators – Python Wiki ] are. And before you understand what generators are, you must understands what iterables [Iterables – PLYMI] are. Iterables Definition: An iterable is any Python object capable of returning its members one at a time,… Continue reading python yield keyword