Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PythonµÄ×Ö·û´®

PythonÖÐ×Ö·û´®±»¶¨ÒåΪÒýºÅÖ®¼äµÄ×Ö·û¼¯ºÏ¡£PythonÖ§³ÖʹÓóɶԵĵ¥ÒýºÅ»òË«ÒýºÅ£¬ÈýÒýºÅ°üº¬µÄ×Ö·û´®¡£
ʹÓÃË÷Òý²Ù×÷·û([])ºÍÇÐÆ¬²Ù×÷·û([:])¿ÉÒԵõ½×Ó×Ö·û´®¡£×Ö·û´®ÓÐÆäÌØÓеÄË÷Òý¹æÔò£ºµÚÒ»¸ö×Ö·ûµÄË÷ÒýÊÇ£°
£¬×îºóÒ»¸ö×Ö·ûµÄË÷ÒýÊÇ-1¡£
¼ÓºÅ(+)ÓÃÓÚ×Ö·û´®Á¬½ÓÔËË㣬ÐǺÅ(*)ÔòÓÃÓÚ×Ö·û´®Öظ´¡£ÈçÏÂÀý£º
pystr = "Python"
pystr[2:5]½á¹ûΪ£ºtho
'''
Created on 2010-1-12
@author: cuser
'''
s = "abcd"
'''
print(s[0])
print(s[1])
print(s[2])
print(s[3])
print(s[-1])#×îºóÒ»¸ö×Ö·ûµÄË÷ÒýΪ-1
'''
print(s[0:1])
print(s[0:2])
print(s[2:3])
print(s[:2])
print(s[2:])
print(s*2)
print(s*3)
½á¹ûÈçÏ£º
a
ab
c
ab
cd
abcdabcd
abcdabcdabcd


Ïà¹ØÎĵµ£º

×Ô¶¯ÏÂÔØ²¢±£´æ²©¿Í Python½Å±¾

лÁËÒ»¸ö×Ô¶¯ÏÂÔØÖ¸¶¨È˵IJ©¿ÍµÄ½Å±¾
Õâ¸ö½Å±¾ÊÇÓÃÀ´ÏÂÔØcsdn²©¿ÍµÄ
ͬÑùµÄ·½·¨¿ÉÒÔÏÂÔØÒ»°ãÆäËûÍøÕ¾µÄ²©¿Í£¬Èçsina
ÓÐÊ±Ò³Ãæ·ÃÎʻᱻ¾Ü¾ø£¬ÖØÐÂÔËÐм´¿É
ÕâÖÖ³ÌÐòÊÇÔÚ·ÖÎöÁËÖ¸¶¨ÍøÕ¾£¬ÎÒÔÚÕâ¶ùÊÇcsdn£¬Ö®ºó±àд³öµÄ
»áÇ£Éæµ½ÍøÒ³µÄ±àÂëÎÊÌ⣬ÓÐʱ³ÌÐòÔËÐлáÒò´ËÖÕÖ¹
ÎÒ×Ô¼ºµÄ²©¿ÍÒѾ­ÏÂÔØÍüÁË
Ö»ÊÇÏÂÔØÍøÒ³
ʹÓÃÍø ......

scite python API

'''gen_python_api.py generates a python.api file for SciTE
The generated api file includes
*) all Python keywords
*) all builtin functions
*) all module attributes
Module functions are represented by their docstring if available,
otherwise by the function definition from the source file. ......

Python 3 ³õ̽£¬µÚ 1 ²¿·Ö: Python 3 µÄÐÂÌØÐÔ

Python 3 ÊÇ Guido van Rossum ¹¦ÄÜÇ¿´óµÄͨÓñà³ÌÓïÑÔµÄ×îа汾¡£ËüËäÈ»´òÆÆÁËÓë 2.x °æ±¾µÄÏòºó¼æÈÝÐÔ£¬µ«È´ÇåÀíÁËijЩÓï·¨·½ÃæµÄÎÊÌâ¡£±¾ÎÄÊÇϵÁÐÎÄÕÂÖеĵÚһƪ£¬½éÉÜÁËÓ°Ïì¸ÃÓïÑÔ¼°Ïòºó¼æÈÝÐԵĸ÷Öֱ仯£¬²¢ÇÒ»¹ÌṩÁËÐÂÌØÐԵöÀý×Ó¡£
Python °æ±¾ 3£¬Ò²±»³ÆÎª Python 3000 »ò Py3K£¨·ÂЧ Microsoft® Windows ......

Python 3 ³õ̽£¬µÚ 2 ²¿·Ö: ¸ß¼¶Ö÷Ìâ

Python 3 ÊÇ Guido van Rossum ¹¦ÄÜÇ¿´óµÄͨÓñà³ÌÓïÑÔµÄ×îа汾¡£ËüËäÈ»´òÆÆÁËÓë 2.x °æ±¾µÄÏòºó¼æÈÝÐÔ£¬µ«È´ÇåÀíÁËijЩÓï·¨·½ÃæµÄÎÊÌâ¡£±¾ÎÄÊÇÕâ¸öÓÉÁ½²¿·Ö×é³ÉµÄϵÁÐÎÄÕÂÖеĵڶþƪ£¬±¾ÎĹ¹½¨ÔÚ´ËϵÁРǰһÆÚÎÄÕ µÄ»ù´¡Ö®ÉÏ£¬ÄÚÈݺ­¸ÇÁË Python ¸ü¶àµÄÐÂÌØÐԺ͸ü¸ßÉîµÄһЩÖ÷Ì⣬±ÈÈçÔÚ³éÏó»ùÀà¡¢ÔªÀàºÍÐÞÊηûµÈ·½ÃæµÄ ......

Python »ù´¡ 1

1.½âÊÍÐÔ ¿ÉÒÔÖ±½Ó´ÓÔ´´úÂëÔËÐгÌÐò.ÔÚ¼ÆËã»úÄÚ²¿,Python½âÊÍÆ÷°ÑÔ´´úÂëת»»³É³ÆÎª×Ö½ÚÂëµÄÖмäÐÎʽ,È»ºóÔÙ°ÑËü·­Òë³É¼ÆËã»úʹÓõĻúÆ÷ÓïÑÔ²¢ÔËÐÐ.
2.#·ûºÅºóÃæµÄÄÚÈݶ¼ÊÇ×¢ÊÍ.
3.ÔÚ×Ö·û´®ÖÐÐÐÄ©µÄ'\'±íʾÏÂÒ»ÐеÄÄÚÈݺÍÉÏÒ»ÐÐÊǽÓ×ŵÄ;×Ö·û´®Ç°¼ÓÒ»¸ör±íʾijЩ²»ÐèҪתÒå·ûÄÇÑùµÄÌØ±ð´¦ÀíµÄ×Ö·û´®;ÔÚ´¦ÀíÎı¾ÎļþµÄʱºòÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ