from math
import modf
dict = {}
dict[
'one'] =
"1 - 菜鸟教程"
dict[
2] =
"2 - 菜鸟工具"
print(dict)
tinydict = {
'name':
'runoob',
'code':
1,
'site':
'www.runoob.com'}
print(dict[
'one'])
print(dict[
2])
print(tinydict)
print(tinydict.keys())
print(tinydict.values())
print({x: x **
2 for x
in (
2,
4,
6)})
print (
"我叫 %s 今年 %d 岁!" % (
'小明',
10))
def capitalize():
pass
print(
'sldjfk'.capitalize());
转载于:https://www.cnblogs.com/bilaisheng/p/10210949.html