0 votes
1 view
in Python by (12.7k points)

In python 2, You get

>>> from string import *

>>> letters

'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

In python 3, You get

>>> from string import *

>>> letters

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

NameError: name 'letters' is not defined

It's not characterized, while digits and whitespace are. 

In python 2, What is the comparability of letters from the string module?

1 Answer

0 votes
by (26.4k points)

Instead of letters, you can try to use string.ascii_letters.

Check this documentation, for more information.

Want to learn python to get expertise in the concepts of python? Join python certification course and get certified

For more details, do check out the below video tutorial...

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...