Jan-16-2023, 01:36 PM
Can
*
unpack it like this,one of the few cases where format()
is useful over f-string
.>>> n = '12345678' >>> req = "{}{}{}-{}{}-{}{}{}".format(*n) >>> req '123-45-678'