Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74954 > unrolled thread

How to use string constant?

Started byfl <rxjwg98@gmail.com>
First post2014-07-21 13:46 -0700
Last post2014-07-21 17:52 -0400
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  How to use string constant? fl <rxjwg98@gmail.com> - 2014-07-21 13:46 -0700
    Re: How to use string constant? Terry Reedy <tjreedy@udel.edu> - 2014-07-21 17:52 -0400

#74954 — How to use string constant?

Fromfl <rxjwg98@gmail.com>
Date2014-07-21 13:46 -0700
SubjectHow to use string constant?
Message-ID<2b1f7af1-1967-4610-a10c-d4ce625ec184@googlegroups.com>
Hi,

I learn string constant on Python tutorial at: 
https://docs.python.org/2/library/string.html

Although it gives explanation, it does not show me any example usage.

Could you give me an example on using these options?


string.digits

string.ascii_letters



Thanks,

[toc] | [next] | [standalone]


#74959

FromTerry Reedy <tjreedy@udel.edu>
Date2014-07-21 17:52 -0400
Message-ID<mailman.12155.1405979707.18130.python-list@python.org>
In reply to#74954
On 7/21/2014 4:46 PM, fl wrote:
> Hi,
>
> I learn string constant on Python tutorial at:
> https://docs.python.org/2/library/string.html
>
> Although it gives explanation, it does not show me any example usage.
>
> Could you give me an example on using these options?
>
>
> string.digits
>
> string.ascii_letters

 >>> import string
 >>> 'a' in string.ascii_letters
True
 >>> 'a' in string.digits
False



-- 
Terry Jan Reedy

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web