函数作用
repr:repretension 生成展示对象的字符串
eval:evaluetion求字符串里面的值
exec: 执行字符串内的命令或者变量
str:字符串化
返回类型
repr:字符串
eval:字符串或者整形值
exec: 返回函数执行后的结果
str:字符串
repr is for developers, str is for customers.
the goal of repr is to be unambiguous and str is to be readable.
>>> import datetime
>>> today = datetime.datetime.now()
>>> str(today)
'2012-03-14 09:21:58.130922'
>>> repr(today)
'datetime.datetime(2012, 3, 14, 9, 21, 58, 130922)'