To remove the endline character, rstrip() should be used, to preserve the whitespace at the start of the line. To check for an empty line, maybe isspace() is more efficient?
items = [line.rstrip() for line in f if not line.isspace() and not line.lstrip().startswith('#')]
EDIT: this assumes a comment cannot be added in the end of the line (e.g. like in Python).