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?
4 RĂ©ponses
+ 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
+ 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.
+ 1
Thanks a lot, Uday Kiran and Kiibo Ghayal.
0
Rich Joy In case If you want to assign the same value to more than one variable, simply use =
hello = world = True