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
In questa pagina del sito puoi guardare il video online Python Variables || Multiple Values assignment della durata di ore minuti seconda in buona qualità , che l'utente ha caricato cbsecsip 19 aprile 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,049 volte e gli è piaciuto 30 spettatori. Buona visione!