摘要:
As it turns out, there is a string method named find that is remarkably similar to the function we wrote: >>> word = 'banana' >>> index = word.find('a 阅读全文
posted @ 2018-12-18 12:45
anobscureretreat
阅读(569)
评论(0)
推荐(0)
摘要:
>>> import os >>> cwd = os.getcwd() >>> cwd '/home/dinsdale' cwd stands for “current working directory”. The result in this example is /home/dinsdale, which is the home directory of a user named ... 阅读全文
posted @ 2018-12-18 11:47
anobscureretreat
阅读(153)
评论(0)
推荐(0)
摘要:
import random for i in range(10): x = random.random() print(x) The function randint takes parameters low and high and returns an integer between low and high (including both). >>> random... 阅读全文
posted @ 2018-12-18 11:38
anobscureretreat
阅读(204)
评论(0)
推荐(0)
摘要:
>>> import string >>> string.punctuation '!"#$%&'()*+,-./:;?@[\]^_`{|}~' 阅读全文
posted @ 2018-12-18 11:37
anobscureretreat
阅读(342)
评论(0)
推荐(0)
摘要:
Dictionaries have a method called items that returns a sequence of tuples, where each tuple is a key-value pair. >>> d = {'a':0, 'b':1, 'c':2} >>> t = 阅读全文
posted @ 2018-12-18 11:36
anobscureretreat
阅读(134)
评论(0)
推荐(0)
摘要:
>>> for pair in zip(s, t): ... print(pair) ... ('a', 0) ('b', 1) ('c', 2) If you want to use list operators and methods, you can use a zip object to m 阅读全文
posted @ 2018-12-18 11:22
anobscureretreat
阅读(252)
评论(0)
推荐(0)
摘要:
>>> t1 = [1, 2] >>> t2 = t1.append(3) >>> t1 [1, 2, 3] >>> t2 None 阅读全文
posted @ 2018-12-18 11:15
anobscureretreat
阅读(215)
评论(0)
推荐(0)
摘要:
Because list is the name of a built-in function, you should avoid using it as a variable name. I also avoid l because it looks too much like 1. So tha 阅读全文
posted @ 2018-12-18 11:12
anobscureretreat
阅读(179)
评论(0)
推荐(0)
摘要:
There are several ways to delete elements from a list. If you know the index of the element you want, you can use pop: >>> t = ['a', 'b', 'c'] >>> x = t.pop(1) >>> t ['a', 'c'] >>> x 'b' pop modifi... 阅读全文
posted @ 2018-12-18 11:04
anobscureretreat
阅读(150)
评论(0)
推荐(0)
摘要:
包括, 代码段寄存器cs 数据段寄存器ds 附加段寄存器es 栈段寄存器ss 阅读全文
posted @ 2018-12-18 01:14
anobscureretreat
阅读(287)
评论(0)
推荐(0)
摘要:
长度为16bit 包括:ax,bx,cx,dx,si,di,bp,sp 其中,ax,bx,cx,dx,可以作为8位寄存器使用 ah,al bh,bl ch,cl dh,dl 阅读全文
posted @ 2018-12-18 01:12
anobscureretreat
阅读(600)
评论(0)
推荐(0)
摘要:
最强大的王爽汇编语言学习环境使用教程 一、前言 这是采用VMwere Workstation 12 pro虚拟机软件,搭建的MS-DOS学习环境,在windowsXP/8/10及linux中均可以使用,在这个环境中,我集成了CCDOS中文系统,pdos中文系统,使用这些系统,可以进行中文输入与显示。 阅读全文
posted @ 2018-12-18 01:03
anobscureretreat
阅读(2409)
评论(0)
推荐(0)

浙公网安备 33010602011771号