471,337 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

string module usage???

1) is it necessary to import "string" mod in order to use its function??
s=" python "

s.strip() gives 'python'
and
import string
string.strip(s) also gives python

Please tell me the difference and usage of string module...

2) What is difference between remove and delete??
Dec 19 '07 #1
1 1042
ghostdog74
511 Expert 256MB
1) is it necessary to import "string" mod in order to use its function??
s=" python "

s.strip() gives 'python'
and
import string
string.strip(s) also gives python

Please tell me the difference and usage of string module...
no need. some of the string functions in string modules are deprecated.
See here
and also the doc. look for deprecated.

2) What is difference between remove and delete??
where ?
Dec 19 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Brad Tilley | last post: by
108 posts views Thread by Bryan Olson | last post: by
4 posts views Thread by Brad Parks | last post: by
reply views Thread by Crutcher | last post: by
12 posts views Thread by Anoop | last post: by
7 posts views Thread by Leonel Gayard | last post: by
1 post views Thread by nganglove | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.