0

Python 3. Bool

Hello everyone! Can you help me? I have just written the programme: Hello, World = True print(Hello, World) #error Why the error?

25th Jun 2020, 9:10 AM
Rich Joy
Rich Joy - avatar
11 Answers
+ 4
Unpacking is only possible if The values in LHS are equal to values on RHS Hello,World = True ,True print(Hello,World) Output : True True
25th Jun 2020, 10:37 AM
uday kiran
uday kiran - avatar
+ 2
šŠš¢š¢š›šØ š†š”ššš²ššš„ you written on RHS a list comprehension which evolutes to list of 3 values . a,b,c = [0,1,2] since both LHS and RHS values are equal . unpacking will be done.
25th Jun 2020, 12:54 PM
uday kiran
uday kiran - avatar
+ 1
Thanks a lot, Uday Kiran and Kiibo Ghayal.
25th Jun 2020, 10:55 AM
Rich Joy
Rich Joy - avatar
0
Rich Joy In case If you want to assign the same value to more than one variable, simply use = hello = world = True
26th Jun 2020, 7:11 PM
Bhavya Addagada
Bhavya Addagada - avatar