zfill()

zfill(): Fill the string with zeros
Fill zeros upto the input length of the string
my_str='plus2net'
output=my_str.zfill(15)
print(output)

my_str='25'
output=my_str.zfill(5)
print(output)
output is here
0000000plus2net
00025
All String methods



plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer