print and % operator
Peter Hansen
peter at engcorp.com
Thu Sep 9 07:00:05 EDT 2004
More information about the Python-list mailing list
Thu Sep 9 07:00:05 EDT 2004
- Previous message (by thread): print and % operator
- Next message (by thread): print and % operator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ruchika wrote: > I am new to Python, so this may be a very simple question for most of > you. What does the % operator stand for in Python? I came across a > script that uses the % operator as follows - > > def sync(delf,name): > os.popen3( 'P4 -s sync -f %s' % name) > > I would suspect that this just replaces the %s with the value of name. > Is % before name required? Should there be a space between % and name? You _really_ need to go through the tutorial... it answers this question and others you have had and many others you will have. Also consider reading the main FAQ entries soon! -Peter
- Previous message (by thread): print and % operator
- Next message (by thread): print and % operator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list