x.zfill(4) will accomplish this for you. x must be a string value, so if your existing value is a number, it would be str(x).zfill(4).
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.