Basically, if I have a line of text which starts with indention, what\'s the best way to grab that indention and put it into a variable in Python? For example, if the line i
How about using the regex \s* which matches any whitespace characters. You only want the whitespace at the beginning of the line so either search with the regex ^\s* or simply match with \s*.