print 'hello'+'python'
print 'hello, python'
print 'hello, python'
2019-02-18
print r'''"To be, or not to be": that is the question.\nWhether it's nobler in the mind to suffer.'''
2019-02-18
s='Python was started in 1989 by "Guido".''\n''Python is free and easy to learn.'
print s
这样也可以的
print s
这样也可以的
2019-02-18
s = ('Python was started in 1989 by "Guido".\n'
'Python is free and easy to learn.')
'Python is free and easy to learn.')
2019-02-16
L = ['Adam', 'Lisa', 'Bart', 'Paul']
n=1
for index, name in enumerate(L):
if n>4:
break
index = n
n=n+1
print index, '-', name
n=1
for index, name in enumerate(L):
if n>4:
break
index = n
n=n+1
print index, '-', name
d = {
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
print 'Adam:',d['Adam']
print 'Lisa:',d['Lisa']
print 'Bart:',d['Bart']
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
print 'Adam:',d['Adam']
print 'Lisa:',d['Lisa']
print 'Bart:',d['Bart']
2019-02-15