def validate(text): validTypes = ['ext2', 'ext3', 'reiserfs', 'swap', 'vfat', 'ntfs', 'auto'] if text in validTypes: return True return False