Python multiple assignment

Python multiple assignment

Bro Code

3 года назад

28,887 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Bro Code
Bro Code - 31.12.2020 02:48

# 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)

Ответить
Phạm Ngọc Thịnh
Phạm Ngọc Thịnh - 10.11.2023 10:17

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

Ответить
5k1nny
5k1nny - 26.09.2023 23:00

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?

Ответить
IceCream7634
IceCream7634 - 17.09.2023 06:05

“Attractive” lol

Ответить
BUDDERRAR
BUDDERRAR - 15.09.2022 18:02

noice

Ответить
Tamekka Knuth
Tamekka Knuth - 06.09.2022 21:02

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

Ответить
KiSo
KiSo - 01.08.2022 07:20

Thank you Bro Code for these lessons. ☺️

Ответить
patrick banzon
patrick banzon - 23.07.2022 14:48

23/07/22 7:48pm i was here

Ответить
masoud argoshi
masoud argoshi - 15.07.2022 16:56

i love you

Ответить
Sri Harsha Kavuri
Sri Harsha Kavuri - 05.07.2022 08:01

Hey bro

Ответить
Kemann
Kemann - 08.06.2022 11:52

Great

Ответить
Yiorgos Katopodis
Yiorgos Katopodis - 15.05.2022 02:07

Excellent!

Ответить
DormElf
DormElf - 10.04.2022 20:05

Thanx

Ответить
Saideep
Saideep - 13.03.2022 12:47

Cool bro😎

Ответить
Belugaaa
Belugaaa - 05.03.2022 14:52

Bro u awesome

Ответить
Muxtorjon
Muxtorjon - 02.03.2022 16:36

ty

Ответить
شهَد
شهَد - 26.02.2022 20:58

🤍🤍🤍

Ответить
Ivan Drago
Ivan Drago - 25.02.2022 00:54

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

Ответить
RD
RD - 03.02.2022 20:32

Thank You Bro!

Ответить
Muhriddin Sharipov
Muhriddin Sharipov - 01.02.2022 11:58

Thank you

Ответить
Luiz Castro
Luiz Castro - 31.01.2022 10:37

why would this be useful besides just making it more organized?

Ответить