Python multiple assignment 🔠

preview_player
Показать описание
Python multiple assignment tutorial example explained

#python #multiple #assignment

# multiple assignment = allows us to assign multiple variables at the same time in one line of code

name = "Bro"
age = 21
attractive = True

name, age, attractive = "Bro", 21, True

print(name)
print(age)
print(attractive)

# Spongebob = 30
# Patrick = 30
# Sandy = 30
# Squidward = 30

# Spongebob = Patrick = Sandy = Squidward = 30

# print(Spongebob)
# print(Patrick)
# print(Sandy)
# print(Squidward)

Bro Code merch store 👟 :
===========================================================
===========================================================
Рекомендации по теме
Комментарии
Автор

# multiple assignment = allows us to assign multiple variables at the same time in one line of code

name = "Bro"
age = 21
attractive = True

name, age, attractive = "Bro", 21, True

print(name)
print(age)
print(attractive)

# Spongebob = 30
# Patrick = 30
# Sandy = 30
# Squidward = 30

# Spongebob = Patrick = Sandy = Squidward = 30

# print(Spongebob)
# print(Patrick)
# print(Sandy)
# print(Squidward)

BroCodez
Автор

thank you for all your great work. I truly do appreciate this.!!

tamekkaknuth
Автор

thank you so much i really like all your videos it's simple and easy to understand

phamngocthinh
Автор

Thank you Bro Code for these lessons. ☺️

kiso
Автор

my son loves coding so keep making those videos

neverlandio
Автор

Let's hope that YouTube algorithm will work for you 🖤

qlwbyfq
Автор

Sir your explanation was very well
I have one doubt what if their age was not equal

adithyabharadwaj
Автор

Say the line
Spongebob = Patrick = Sandy = Squidward = 30

Why does printing one automatically print 30 do integers have a priority over the strings?

I tried to look it up is the priority right to left and if so if you swap around 30 and Squidward would it pop out Squidward in the console?

knny
Автор

It won't run my multiples but it gives me the check mark acknowledging I'm right ??

Weduboey