Thread
Ever wondered why Slices and Range Exclude the last item in Python ?
Let's explore in today's thread 🧵
Let's explore in today's thread 🧵
{Consistency in number of items produced when only stop is given }
range(N) and list[:N] both produce N items
range(N) and list[:N] both produce N items
{ Easy to compute length of slice or range when start and stop are given }
Just subtract stop-start
Just subtract stop-start
Hello 👋
I am Jaydeep From Pune, India 🇮🇳
Full time Software Engineer & Partime content creator on
🐦Twitter
🖧 Linkedin
🎥YouTube
Follow me @_jaydeepkarale for content on
🐍 Python
🤖Ai/ML
🎨Data Visualization
🌟Content creation
I am Jaydeep From Pune, India 🇮🇳
Full time Software Engineer & Partime content creator on
🎥YouTube
Follow me @_jaydeepkarale for content on
🐍 Python
🤖Ai/ML
🎨Data Visualization
🌟Content creation
Mentions
See All
Afiz ⚡️ @itsafiz
·
Apr 3, 2023
very informative thread Jaydeep.