如果要對字符串使用=,則需要使用int() 將其轉換為數字。 # print('sign: {:0=10}'.format('-100')) # ValueError: '=' alignment not allowed in string ...
確定! 回上一頁