#!/usr/bin/env python
#coding:utf-8
name = raw_input("name:")
sex = raw_input("sex:")
age = int(raw_input("age:"))
info0 = ‘‘‘
-------- inio fo0 -------
name: ‘‘‘ + name + ‘‘‘
sex: ‘‘‘ + sex + ‘‘‘
age: ‘‘‘ + str(age)
print info0
info2 = ‘‘‘
-------- inio fo2 {0} -------
name: {0}
sex: {1}
age: {2}
‘‘‘ .format(name,sex,age)
print info2
info3 = ‘‘‘
-------- inio fo3 -------
name: %s
sex: %s
age: %d
‘‘‘ % (name,sex,age)
print info3
info4 = ‘‘‘
-------- inio fo4 -------
name: {_name}
sex: {_sex}
age: {_age}
‘‘‘ .format(_name=name,_sex=sex,_age=age)
print info4 #推荐使用
时间: 2024-10-08 09:12:13