Skip to main content
John Machin's user avatar
John Machin's user avatar
John Machin's user avatar
John Machin
  • Member for 15 years, 3 months
  • Last seen more than 7 years ago
531 votes
Accepted

CSV in Python adding an extra carriage return, on Windows

211 votes
Accepted

How do I load a file into the python console?

187 votes

How to remove items from a list while iterating?

149 votes

Python: Removing list element while iterating over list

127 votes
Accepted

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

125 votes

Cost of len() function

121 votes

Python CSV error: line contains NULL byte

96 votes
Accepted

Find path to currently running file

94 votes
Accepted

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

93 votes

Correct way to write line to file?

90 votes

How to extract a floating number from a string

81 votes

Stripping everything but alphanumeric chars from a string in Python

80 votes

Check if string contains only whitespace

75 votes
Accepted

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

72 votes
Accepted

Python 2 CSV writer produces wrong line terminator on Windows

72 votes
Accepted

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

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"?

64 votes

TypeError: 'NoneType' object is not iterable

63 votes
Accepted

python-re: How do I match an alpha character

57 votes
Accepted

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

56 votes
Accepted

Converting a Python Float to a String without losing precision

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?

48 votes

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

48 votes
Accepted

Get a list of all the encodings Python can encode to

48 votes
Accepted

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

45 votes
Accepted

How to append to a CSV file?

44 votes
Accepted

Round with integer division

43 votes
Accepted

python xlrd unsupported format, or corrupt file.

1
2 3 4 5
42