trekhleb / learn-python

📚 Playground and cheatsheet for learning Python. Collection of Python scripts that are split by topics and contain code examples with explanations.
MIT License
16.45k stars 2.69k forks source link

Incorrect Info in datatype(string) #73

Open prajwalkedari opened 2 years ago

prajwalkedari commented 2 years ago
# +---+---+---+---+---+---+
#  | P | y | t | h | o | n |
#  +---+---+---+---+---+---+
#  0   1   2   3   4   5   6
# -6  -5  -4  -3  -2  -1

HEY ☺️ @trekhleb 👋,

In Chapter 3 . DataTypes (3.3 $tring) You explain about String Index

Whereas In Line (76-80) I found an Mistake

Pls 🙏 reCorrect

Info view The Problem

+---+---+---+---+---+---+

#  | P | y | t | h | o | n |
#  +---+---+---+---+---+---+
#  0   1   2   3   4   5   6
#  _-7_ -6  -5  -4  -3  -2  **_-1_**

I actually test python[-1] = n (_we get last char of string)`

Love❤️ Your Work on this Repo REGARD @prajwalkedari