The expandtabs() method in Python String returns a copy of the string where the tab characters ie. '\t' use spaces to expand, making use of the given tabsize (default 8) optionally.
str.find(str, beg=0, end=len(string))
Index if found and -1 otherwise.
#!/usr/bin/python str1 = "this is string example....wow!!!"; str2 = "exam"; print str1.find(str2) print str1.find(str2, 10) print str1.find(str2, 40)
15 15 -1
Here at Intellinuts, we have created a complete Python tutorial for Beginners to get started in Python.