| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Occurs when trying to access an index on a non-sequence type like int.
phone_number = 1234567890
print(phone_number[0])TypeError: 'int' object is not subscriptable
phone_number = 1234567890
phone_str = str(phone_number)
print(phone_str[0])Tried to index a number directly. Converting to string fixed it.
Related case: https://pyai.io/en/python/basic/strings/
| Back | FazBrowse Home | New Git URL |