Python3 array join problem [1] + [2] if False else [3]

a = [1]
b = [2]
c = [3]

a += b if False else c
print(a) -sharp [1,3] 

a = a + b if False else c
print(a) -sharp [3] 
Mar.08,2022
For the question of

priority, the branches of a + b if False else c are a + b and c , which is equivalent to (a + b) if False else c ). You should expect a + (b if False else c) .


a + = b if False else c is equivalent to

if False:
    a = a + b
else:
    a = c
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e2ea-2c3d6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e2ea-2c3d6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?