Try to avoid extraneous spaces in list
s and
tuple
s. Python programs should be relatively
compact. Prose writing typically keeps ()'s close to their contents, and
puts spaces after commas, never before them. This should hold true for
Python, also. The preferred formatting for list
s
and tuple
s, then, is (1,2,3)
or
(1, 2, 3)
. Spaces are not put after the enclosing [
]
's or ( )
's. Spaces are not put before
,
's.