4 def get_word_at_pos(str, pos
):
9 word_chars
= string
.ascii_letters
+ string
.digits
+ "._"
10 if str[pos
] not in word_chars
:
13 while beg
>= 1 and str[beg
- 1] in word_chars
:
16 while end
< len(str) - 1 and str[end
+ 1] in word_chars
:
18 return str[beg
:end
+ 1]