import sys
from PyQt4 import QtGui,QtCore
def foo(s): # foo
print (s)
app = QtGui.QApplication(sys.argv)# app () - QApplication
w = QtGui.QWidget() # w - - QWidget()
w.resize(250, 30) # resize w
e = QtGui.QLineEdit(w) # e - - QLineEdit(), w
w.connect(e, QtCore.SIGNAL('textChanged(QString)'), foo) # foo
w.show() #
app. exec _()
, , .
: , :
def mysum(x):
s=x[0]
for i in x[1:]:
s+=i
return s
s, ! , ( )
s=x[0].copy()
Python
, .
numpy , .
max() . .
, . , , , , , . . , . : txt, docx, pdf .
, . , split().
. .
.
, , - ;, , . , , ; - ;
|
|
Python
/ Tab Shift+Tab.
Python! , , .
.
- * 0.
Syntax Error: invalid syntax
, ,
for j in range(jmax):
.
Spyder , .
( ) Python
for k in [0x0391,0x03B1]:
for i in range(k,k+25):
print (chr(i), end=' ')
print ()
Python
"".join(), , .
, , , "".join() (. ).