+ 2

(4) đŸ€Ł

Why are () accepted in parameter values in Python when they are not required ? a=(8)

18th Mar 2021, 3:42 AM
Sanjay Kamath
Sanjay Kamath - avatar
5 Answers
+ 5
a = ((((((((((8)))))))))) is also valid Similar: b = 4 / 2 + 10 / 2 b = (4 / 2) + (10 / 2) will evaluate to same result () are not required but we can use them for readability.
18th Mar 2021, 5:08 AM
Mihai Apostol
Mihai Apostol - avatar
+ 1
[2]-[1]
18th Mar 2021, 7:07 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 1
Jan Markus you're on a roll today. are you all right? you've done too much meditation? I'm worried about you đŸ€Ż
18th Mar 2021, 6:07 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Take care of yourself
19th Mar 2021, 9:19 PM
Rayheart
Rayheart - avatar