format string formatting

m='i am {} age {} '.format('tom','12')
print(m)

. format and to correspond to

m='i am {1} age {0} '.format('tom','12')
print(m)

corresponding list value

Binary, hexadecimal 
m= ' number: {:b},{:x} ' .format(15,15 ) print (m)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324738094&siteId=291194637