Python indexing 📑

preview_player
Показать описание
Python index operator tutorial explained

#python #index #indexing

# index operator [] = gives access to a sequence’s element (str,list,tuples)

name = "bro Code!"

#if(name[0].islower()):

first_name = name[:3].upper()
last_name = name[4:].lower()
last_character = name[-1]

print(first_name)
print(last_name)
print(last_character)
Рекомендации по теме
Комментарии
Автор

# index operator [] = gives access to a sequence’s element (str, list, tuples)

name = "bro Code!"

#if(name[0].islower()):
#name = name.capitalize()

first_name = name[:3].upper()
last_name = name[4:].lower()
last_character = name[-1]

print(first_name)
print(last_name)
print(last_character)

BroCodez
Автор

i love how good he is in explaining stuff

cufvgnz
Автор

I love your tutorials <3 Great job Bro

ksp
Автор

Bro the thumbnail literally explained everything thank you😅

UsTube.
Автор

Thank you! Your explanation is amazing Bro! 💪❤️‍🔥

Younex
Автор

that was so helpful, finally I understand. Thank you so much!

olympus_realm
Автор

when a 6 minute video teaches you more than an entire lecture

rameensarwar
Автор

Cool videos Bro.
How would you go about finding the which index location has the space between first and last name?

DanStone
Автор

Thank you for these videos. I can't explain why, but your method of teaching makes it stick! I do have one question -- when switching Bro to capital leters, why did Code switch to small letters in the first ".capitalize" example? Does that command swap the case of everything except [0] to lower unless you specifiy; eg: [0, 4]?

SolidSavvy
Автор

what about when we need to intex reversed? lets say from "!" to "c" and we want this output : !edoc ? can you help me with that?
or from -1 to -5, what is the command we need to write?

xehlhmb
Автор

i literally dont getting the counting, b is = 0 why o is = 3
i literally do not get it
can someone explain

shawaynewilliamson
Автор

I love your tutorials <3 Great job Bro

limseraj