Python Variables
Multiple Values assignment:
Multiple Values Cn be received in multiple Comma Separated variables.
a, b = 10, 20
But if we do not know how many values are going to take in variables, we can use “ * “ Operator to receive the values in a list form.
a, b = 10, 20, 30 # error
a, *b, c = 10, 20, 30, 40
print(a)
OUTPUT: 10 # type(a) class ‘int’
Print(b)
OUTPUT: [20, 30] # type(b) class ‘list’
Print(c)
OUTPUT: 40 # type(c) class ‘int'
Website:
-------------
https://cbsecsip.in
Link for Topic-wise video lectures:
------------------------------------------------------
XII Computer Science (CBSE): https://bit.ly/30mnNAW
XII Informatics Practices(CBSE): https://bit.ly/3dNqMXd
Social Network:
-------------------------
Telegram Group (For Study Materials): https://t.me/cbsecsip
Facebook: / cbsecsandip
On this page of the site you can watch the video online Python Variables || Multiple Values assignment with a duration of hours minute second in good quality, which was uploaded by the user cbsecsip 19 April 2020, share the link with friends and acquaintances, this video has already been watched 2,049 times on youtube and it was liked by 30 viewers. Enjoy your viewing!