1.python123çèè¯å·¥å
·å¨åª
2.python123ï¼
3.pythin123èè¯åå±
4.pythonèè¯ç³»ç»ä¸ä¸äº
python123çèè¯å·¥å ·å¨åª
pythonçèè¯å·¥å ·å¨pythonèè¯ç³»ç»è½¯ä»¶ãPythonæ¯æè²é¨æ¨èçå¯ä¸å¤èå¹³å°ï¼èè¯ä¸çè¯é 模å¼æ¯ä¸Pythonè¯é 模å¼æ¯ä¸æ ·çï¼æç¹ç±»ä¼¼äºéèçæµè¯ç¨ä¾ï¼èè¯ä¸ä¸è¯é ãä¸æ示ï¼æ交åå ¨å½ç»ä¸è¯é ãåªæå¨Pythonå¹³å°ä¸ç»ä¹ ï¼æè½è¿ éäºè§£èªå·±çä¸è¶³ã
pythonï¼
pythonæä¹äº¤å·
æ¶é´å°äºãpythonæä¸æµè¯ç®¡çå设置æ¶é´éå¶ï¼æ¶é´å°äºæªç¹æ交çå·ï¼ç³»ç»ä¼èªå¨æ交çå·çå¢ãæ¶é´å°äºå°±ä¼èªå¨äº¤å·ãPythonå ¶å®å°±æ¯ä¸ä¸ªpythonçå¨çº¿å¦ä¹ ç½ç«ï¼å¨è¿ä¸ªç½ç«ä¸é¢æå¾å¤çpython课ç¨åpythonç»ä¹ é¢æä¾ç»å¦ä¹ è è¿è¡å¦ä¹ åç»ä¹ ã
pythonæ ¹æ®é®çè¾å ¥è¾åºåå ¸çå¼
pythonæ ¹æ®é®çè¾å ¥è¾åºåå ¸çå¼#?线考n线博客 源码 html以è¾å ¥3个å¼åé®ä¸ºï¼dic?=?{ }for?i?in?range(0,3):key?=?input("è¾å ¥å»º:")val?=?input("è¾å ¥å¼:")ã
a={ '1':'yi,,','4':'si,,',..........}æ£ç´¢å°1æ¶ï¼è®©str=âyiâãlist1=['2','2','2']ãlist2=['3','3','3']æ£ç´¢å°2æ¶ï¼è®©str=âsiâãlist1=['4','4','4']ãlist2=['5','5','5']ã
pythonå¯ç§»æ¤æ§ï¼
pythonç±äºå®çå¼æºæ¬è´¨ï¼Pythonå·²ç»è¢«ç§»æ¤å¨è®¸å¤å¹³å°ä¸ï¼ç»è¿æ¹å¨ä½¿å®è½å¤å·¥ä½å¨ä¸åå¹³å°ä¸ï¼ã
è¿äºå¹³å°å æ¬LinuxãWindowsãFreeBSDãMacintoshãSolarisãOS/2ãAmigaãAROSãAS/ãBeOSãOS/ãz/OSãPalmOSãQNXãVMSãPsionãAcomRISCOSãVxWorksãPlayStationãSharpZaurusãWindowsCEãPocketPCãSymbian以åGoogleåºäºlinuxå¼åçandroidå¹³å°ã
pythonèè¯æ¨¡å¼æä¹å¤å¶å¨pythonä¸ç¨æä¸ä¸ªæ¨¡åå¯ä»¥ç¨æ¥å¤çåªåæ¿å¤å¶çå 容ï¼pyperclip模å
pyperclip模åæcopy()åpaste()å½æ°ï¼åå«ç¨äºå计ç®æºçåªè´´æ¿åéææ¬ï¼æä»å®æ¥åææ¬ã
pyperclip模åä¸æ¯pythonèªå¸¦çãæ以è¦å®è£ è¿ä¸ªæ¨¡åï¼ä¾å¦pipinstallpyperclip
ä¸é¢å°±è¿ä¸ªæ¨¡åç使ç¨ç®å举ä¾ï¼
1.ä¾é¢1
å建ä¸ä¸ªæ件ç¨æ¥åå¨ä½ çå¤ä¸ªè´¦æ·çå¯ç åºç¨ï¼(å设å建çpyæ件å为ï¼pw.py)
#ï¼python3
PASSWORDS={ 'email':'adjofahoweghowaehgg',
'blog':'GEAGefwegEgeghfewEGEegeåµåµè·äºç´å¥hhaji',
'luggage':''}
importsys,pyperclip
iflen(sys.argv)2:
print('请è¾å ¥ï¼pypw.pyå¸å·å-以确认ç¨äºæ¥è¯¢ç¸åºçå¯ç ')
sys.exit()
account=sys.argv[1]
ifaccountinPASSWORDS:
pyperclip.copy(PASSWORDS[account])
print('Passwordfor'+account+'å·²ç»å¤å¶ï¼è¯·ç²è´´ä½¿ç¨')
else:
print('ç³»ç»ä¸æ æ¤è´¦æ·çè®°å½')
è¿è¡å¦ä¸ï¼
pythonpw.pyblog
Passwordforblogå·²ç»å¤å¶ï¼è¯·ç²è´´ä½¿ç¨
è¿è¡ç¨åºåï¼å 容已ç»èªå¨å°ä½ ççµèçåªè´´æ¿ä¸é¢ï¼ä½ ç´æ¥ç²è´´ä½¿ç¨å³å¯ï¼è¿ç§æ¹æ³å¯ä»¥ç¨äºç®¡çä½ çè´¦æ·å¯ç ï¼æ 论设置å¤å¤æçå¯ç é½ä¸ç¨æ å¿è®°ä¸ä½ï¼ç´æ¥ç²è´´ä½¿ç¨å³å¯ï¼
ä¾é¢2ï¼
ä¸é¢ä¾é¢ææå°å¯¹åªè´´æ¿å 容çå¤å¶åç²è´´ï¼ä½æçæ¶åæ们å¤å¶çå 容ï¼æ们æ³å¯¹å¤å¶çå 容添å è¿å»æ们èªå·±æ³è¦è®¾å®çä¸è¥¿ï¼ä¸é¢æ们ç¨ä¾é¢æ¥åæï¼
ä¾å¦ï¼æ们å¨çµèä¸é¢å¤å¶äºä¸æ®µææ¬ï¼å 容å¦ä¸ï¼
Listofanimals
Listsofaquariumlife
Listsofbiologistsbyauthorabbreviation
Listofcultivars
æ们æ³è¦å¨è¿æ®µææ¬çæ¯è¡åé¢é½å ä¸ä¸ä¸ªâ*âå·
代ç ï¼
#ï¼python3
importpyperclip
text=pyperclip.paste()#å°æ们已ç»å¤å¶å°çµèåªè´´æ¿åå¤ç²è´´çå 容èµç»text
lines=text.split('\n')#split()æ¹æ³ç¨äºæå®ä»¥æ个å符æ¥åå²å符串ä¾å¦ï¼spam="helloi'mpeter"spam.split("'")è¾åºçæ¯ï¼['helloi','mpeter']
foriinrange(len(lines)):
lines[i]='*'+lines[i]
text='\n'.join(lines)#lineséè¿å¤çåºæ¥æ¯ä¸ä¸ªå符å表ï¼ètextæ¯éè¦ä¸ä¸ªå符串ï¼å æ¤éè¦ç¨å°joinæ¥è¿æ¥åå表ä¸çåå符串
pyperclip.copy(text)
#joinæ¹æ³å¨ä¸ä¸ªå符串ä¸è°ç¨ï¼åæ°æ¯ä¸ä¸ªå符串å表ï¼è¿åä¸ä¸ªå符串ãè¿åçå符串ç±ä¼ å ¥çå表ä¸æ¯ä¸ªå符串è¿æ¥èæã
å¦:','.join['cats','rats','bats']
out:'cats,rats,bats'
''join['cats','rats','bats']
out:'catratsbats'
pythonèè¯ç³»ç»æä¹ç¨pythonèè¯ç³»ç»æ¥éª¤ã
1ãé å使ç¨pythonèè¯ç³»ç»è½¯ä»¶ã
2ã使ç¨shellä¸çå½ä»¤ï¼expectã
3ã使ç¨pythonçpexpect模åã
4ãæå¸è´¦æ·çé¢ä¸çèåºç¶æï¼å®æ¶çæ§ææèççè´¦æ·ç»éæ åµã
pythonèå¸è½çå°ç»éipåä¸è½ã该平å°çå¦ç端æ¯æ²¡ææ¥çå ¶ä»äººåç»å½ipçåè½çï¼åªææå¸ç«¯å ·æ该åè½ãpythonï¼æ¯é¢åæ°å·¥ç§æå¦éæ±ç计ç®æºç±»åºç¡è¯¾ç¨æå¦è¾ å©å¹³å°ã
pythinèè¯åå±
pythinèè¯åå±é æåæå¦ä¸ã
1ãpythonèè¯åå±ç³»ç»ä¼å¤å®æ¯åå±çæä½ï¼ä¼å½±åå°èè¯æ绩ã
2ãpythonèè¯ç®¡çåå¨åå°è®¾ç½®äºé²åå±ï¼ç®¡çåæ¯å¯ä»¥çå°çèççåå±æ¬¡æ°ï¼å¦è¶ äºç®¡çå设置çåå±æ¬¡æ°ï¼åç³»ç»ä¼å¼ºå¶äº¤å·ã
pythonèè¯ç³»ç»ä¸ä¸äº
pythonèè¯ç³»ç»ä¸ä¸äºæ¯å 为ç½ç»ä¸å¥½æè æå¡å¨åºç°æ éãæ ¹æ®æ¥è¯¢ç¸å ³å ¬å¼ä¿¡æ¯æ¾ç¤ºï¼æå¼ç¾åº¦å¨è¾å ¥æ¡ä¸è¾å ¥pythonï¼ç¶åæ¾å°pythonçå®ç½ï¼ç¹å»é¾æ¥è¿å ¥ä¹åï¼é¼ æ 移å¨å°èåä¸çDownloadséæ°ä¸è½½å³å¯ã