More than one format in the string,formatstring,#If there is
More than one format in the string,formatstring,#If there is
#If there is more than one format in the string, you need to pass a tuple as right# operand, as in this example:table = {'A': 4127, 'B': 4098, 'C': 7678}for name, phone in table.items(): print '%-10s ==> %10d' % (name, phone)
相关内容
- Find symbolic links and show where they point to,symboliclinks,'''P
- Close a file,closefile,f=open('/tmp
- Define and use int,defineanduseint,a = 3
- Display a slice,displayslice,inventory =
- Define function: return int value,definefunction,def inc(x):
- A function that returns a list of the numbers of the Fibonacci series,
- Return three value,returnthreevalue,def func(x,
- Turn parameters into a dictionary,,def f(**args
- For loop through the dictionary keys,dictionarykeys,table = {'Py
- Using List Operators,usingoperators,li = ['a', '
评论关闭