|
2h
|
|
answered | Create python dictionary from value of another dictionary? |
|
4h
|
|
comment |
How simplify list processing in Python? Entirely for fun (don't use this), here is a one-liner: print(','.join(c+'='+''.join('xw r'[i-1:i&b] for i in (4,2,1)) for c,b in zip('ugo',map(int,raw_input("Octal? ")))))
|
|
5h
|
|
answered | Odd behavior with Python regular expressions - findall only finds the "()?" portion |
|
5h
|
|
comment |
Compare length of three lists in python Okay I edited my answer to include that. You will either want to use if not all(...) with == or if any(...) with !=.
|
|
5h
|
|
revised |
Compare length of three lists in python added 222 characters in body |
|
5h
|
|
comment |
Compare length of three lists in python You could use if not all(len(lst) == length ...) or if any(len(lst) != length ...) to find out if any list has a different length. Or do you actually need to know which lists have different lengths?
|
|
5h
|
|
answered | Compare length of three lists in python |
|
6h
|
|
revised |
Python string.replace regular expression added 318 characters in body |
|
6h
|
|
answered | Python string.replace regular expression |
|
6h
|
|
comment |
Why generator iteration in list of lists doesn't work? Should be item as the element yielded in the generator, not sub_list.
|
|
6h
|
|
answered | Why generator iteration in list of lists doesn't work? |
|
7h
|
|
revised |
Why sed doesn't print an optional group? added 336 characters in body |
|
7h
|
|
revised |
Why sed doesn't print an optional group? added 336 characters in body |
|
7h
|
|
answered | Why sed doesn't print an optional group? |
|
7h
|
|
comment |
Why sed doesn't print an optional group? Why are you using .* in the expression, can the underscores be replaced with any arbitrary string?
|
|
2d
|
|
comment |
Regex in Python for html See my edit, the issue you were seeing was due to a difference between versions. |
|
2d
|
|
revised |
Regex in Python for html added 146 characters in body |
|
2d
|
|
comment |
Regex in Python for html This indicates that soup is None, did you import BeautifulSoup and use soup = BeautifulSoup(page) before this?
|
|
2d
|
|
comment |
Regex in Python for html I added an edit which includes find_all() usage.
|
|
2d
|
|
revised |
Regex in Python for html added 161 characters in body |