---
title: "TypeError: 'NoneType' object is unsubscriptable"
author: "zhanyingle_1981"
date: "2012-11-08T14:36:06Z"
tags: []
categories: ["编程语言"]
slug: "typeerror-nonetype-object-is-unsubscriptable"
draft: false
lastmod: "2012-11-08T14:36:06Z"
id: 1720317
url: "https://leonzhan.iteye.com/blog/1720317"
---

TypeError: 'NoneType' object is unsubscriptable

 

 x = None 然后你使用了x\[0]，就会出现这个错误。

 

If a list a is none, and you use a\[1], it will throw this error