How to print the ASCII punctuation characters in Python

1 Answer

0 votes
import string  
 
for ch in string.punctuation:
    print(ch)
 
 
     
'''
run:
 
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/
:
;
<
=
>
?
@
[
\
]
^
_
`
{
|
}
~

'''

 



answered May 17, 2019 by avibootz
...