Skip to main content
John Machin's user avatar
John Machin's user avatar
John Machin's user avatar
John Machin
  • Member for 17 years, 1 month
  • Last seen more than 8 years ago
539 votes
Accepted

CSV in Python adding an extra carriage return, on Windows

213 votes
Accepted

How do I load a file into the python console?

187 votes

How to remove items from a list while iterating?

150 votes

Python: Removing list element while iterating over list

128 votes
Accepted

How to import a csv file using python with headers intact, where first column is a non-numerical

126 votes

Cost of len() function

121 votes

Python CSV error: line contains NULL byte

100 votes
Accepted

How to preserve timezone when parsing date/time strings with strptime()?

99 votes
Accepted

Find path to currently running file

98 votes

Correct way to write line to file?

90 votes

How to extract a floating number from a string

83 votes

Check if string contains only whitespace

80 votes

Stripping everything but alphanumeric chars from a string in Python

75 votes
Accepted

Generating CSV file for Excel, how to have a newline inside a value

74 votes
Accepted

How to print the sign + of a digit for positive numbers in Python

72 votes
Accepted

Python 2 CSV writer produces wrong line terminator on Windows

68 votes
Accepted

urllib.urlencode doesn't like unicode values: how about this workaround?

66 votes

Why am I seeing "TypeError: string indices must be integers"?

66 votes
Accepted

python-re: How do I match an alpha character

64 votes

TypeError: 'NoneType' object is not iterable

58 votes
Accepted

Converting a Python Float to a String without losing precision

57 votes
Accepted

In Python, how to check if a string only contains certain characters?

56 votes

Is it possible to convert a list-type into a generator without iterating through?

54 votes

How do I add the contents of an iterable to a set?

49 votes
Accepted

Get a list of all the encodings Python can encode to

49 votes
Accepted

Use lambda expression to count the elements that I'm interested in Python

48 votes

Should I use 'has_key()' or 'in' on Python dicts?

45 votes
Accepted

Round with integer division

45 votes
Accepted

How to append to a CSV file?

44 votes
Accepted

python xlrd unsupported format, or corrupt file.

1
2 3 4 5
42