s = '''Python was started in 1989 by "Guido".
Python is free and easy to learn.'''
print s
Python is free and easy to learn.'''
print s
2014-11-29
這題是這樣的。第四位隨便是提交時提示你59不匹配,這里提示的59是第四位的成績,正好用倒敘[-1]可以。。我是這樣理解的 勿噴。。。
2014-11-28
左邊那兒寫錯了吧= =
x = '???' # 用戶輸入的字符串
if x != 'MON' and x != 'TUE' and x != 'WED' ... and x != 'SUN':
print 'input ok'
else:
print 'input error'
x = '???' # 用戶輸入的字符串
if x != 'MON' and x != 'TUE' and x != 'WED' ... and x != 'SUN':
print 'input ok'
else:
print 'input error'
2014-11-28
t = ('a', 'b', 'A', 'B')
2014-11-27
每一個課的任務無法讓我們理解與實際應用的關系和意義,與例題等同的任務,成效較低,尤其對于沒有編程基礎的,不會自行發散的人來講意義更不大了!
2014-11-27
s = 'Python was started in 1989 by \"Guido\".\nPython is free and easy to learn.'
print s
print s
2014-11-27
在python中也會有注釋有很多行的時候,這種情況下就需要批量多行注釋符了。多行注釋是用三引號''' '''包含的
2014-11-25
文章中的L[1:3],返回值是['Adam', 'Lisa'],這邊應該是錯的,返回值應該是['Lisa', 'Bart']
2014-11-25