473,394 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Need help on left padding

Hello,

My requirement is I am using one variable ex. var = 5 which is
integer.
And this variable, I m using in some string. But I want this var
to be used as 005 again integer in this string.

The snippet of string is as follows:

container_name = "%s-%d-dso-%s.so" % (platform_affix,var, rteset)
Please let me know how can I implement this efficiently in python
language.

Need help urgent.

Thanks,
-Rajesh
Jun 27 '08 #1
1 930
On Mon, 28 Apr 2008 04:37:02 -0700, rajesh kataraki wrote:
My requirement is I am using one variable ex. var = 5 which is
integer.
And this variable, I m using in some string. But I want this var
to be used as 005 again integer in this string.
In [22]: '%03d' % 5
Out[22]: '005'

Ciao,
Marc 'BlackJack' Rintsch
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Robert P. Stearns | last post by:
I have been trying to convert the following simple table into CSS. <table> <tr><th colspan=2>Header Area</th></tr> <tr><th>Navigation Area</th><th>Information Area</th></tr> <tr><th...
2
by: Ethan | last post by:
I'm trying to set up a page with a header and 2 columns. I would like to use <div>s rather than tables. The page is here... http://64.142.13.246/style_testing_site/style_model2.htm In both IE...
2
by: Oliver Burnett-Hall | last post by:
I'm trying to move to using tableless page layouts, but I've come across what appears to be a bug in IE5's rendering that I can't find a way to overcome. The page has a sidebar to the left of...
4
by: Wilhelm Kutting | last post by:
hi, when i use the padding-left attribut, i like to overwrite a default value like that ..padding30 {margin-left: 30px;} ..padding0 {margin-left: 0px;} <div class="padding30"> Padding 30...
4
by: dsimmons | last post by:
On my website http://seasidequilters.blogspot.com/ I'm having a problem that someone thinks might be associated with Firefox browsers. I'm hoping to find someone in this forum that might be...
3
by: charchap | last post by:
hello. I'm experiencing problems with my css code (once again) working with Firefox and not working with IE 6 or 7 I have a problem with my head_logo_inner not too sure what's going on . Here is...
7
by: arupfrancis | last post by:
Hi, I am trying to create a colored box using background images. I am able to do it easily using tables but doing it in divs is proving to be an issue. Moreover IE and Mozilla also seems to be...
0
victorduwon
by: victorduwon | last post by:
Hi Folks, i have a list based navigation menu with two tiers of navigation. The second tier displays when the tabs on the first tier are hovered over. The problem I have is that when the tabs are...
3
by: Noorain | last post by:
I designed a site. i want to header,footer,left & right column fixed but body information only scrolling. this site screen to be 800/600 px. i designed this way but when i used position fixed all...
5
by: Stepheno | last post by:
Hi, I am a recently converted Iseries (AS/400) RPG programmer trying to learn HTML/CSS/JavsScript all at the same time (not fun). My problem deals mostly with CSS. I will be reveiving a table,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.