WeCodeAcademy
❮ str.isdigit()list.append() ❯

str.zfill()

Pads with zeros on the left.

Group: String

Syntax

s.zfill(width)

Example

Examplepython
Open in editor »

← All of Python Reference