Python - 1.5 Lists & 1.6 File

来源:

https://dabeaz-course.github.io/practical-python/Notes/01_Introduction/05_Lists.html

https://dabeaz-course.github.io/practical-python/Notes/01_Introduction/06_Files.html

vacate

/ˈveɪkeɪt/

词根词缀: -vac-空 + -ate动词词尾

vi.空出,腾出;辞职;休假

vt.空出,搬出;取消;使撤退


“Vacate” 是一个动词,意思是“腾出”或“空出”某个地方,通常是指让出一个位置、房间或座位,也可以用来指正式地辞去职务或职位。它的常见用法包括以下几种:

1. 腾出、搬空某处

用在要求离开某个地方或把某个地方清空的场合。

  • 例句: We need to vacate the room by 10 AM.
    (我们需要在早上10点之前腾出房间。)

2. 辞去职位

用来表示辞去工作或职位。

  • 例句: The CEO will vacate his position at the end of the month.
    (这位CEO将在月底辞去他的职位。)

3. 废除、撤销

可以用在法律或行政领域,指废除某个决定或裁决。

  • 例句: The court has decided to vacate the previous ruling.
    (法庭决定撤销先前的裁决。)

其他形式:

  • Vacated: 已腾空、已辞去职位。
  • Vacating: 正在腾空或辞职的过程。

常见搭配:

  • vacate a room (腾空房间)
  • vacate a seat (让出座位)
  • vacate a position (辞去职位)
Removing an item does not create a hole. Other items will move down to fill the space vacated.

移除物品不会产生洞。其他物品将向下移动以填补空出的空间。

in-place

短语通常强调“在原地”进行的特性,避免了不必要的移动或额外的存储需求

“In-place” 是一个短语,通常表示在原地、不改变位置或不移动的情况下进行某种操作。它在不同的上下文中有多种含义,以下是一些常见用法:

1. 数据处理

在计算机科学中,指在原始数据的位置上进行操作,而不需要额外的存储空间。

  • 例句: The algorithm sorts the array in-place, using only a constant amount of additional memory.
    (该算法对数组进行原地排序,仅使用了常量数量的额外内存。)

2. 位置或状态的保持

表示在原来的地方进行某项活动或变化。

  • 例句: The meeting will be held in-place, so there’s no need to relocate.
    (会议将在原地举行,因此无需迁移。)

3. 现场操作

在某些行业或领域,指在特定位置进行维护或修复,而不是将设备移至其他地方。

  • 例句: The technician performed the repairs in-place to minimize downtime.
    (技术员在原地进行维修,以尽量减少停机时间。)

4. 计算机编程

在编程中,指直接修改原始数据结构,而不是创建副本。

  • 例句: The function modifies the list in-place, so the original list is changed.
    (该函数在原地修改列表,因此原始列表会被更改。)

这个短语通常强调“在原地”进行的特性,避免了不必要的移动或额外的存储需求。

Lists can be sorted “in-place”.

列表可以“就地”排序。

vector

/ˈvektər/

n.矢量,向量;

matrix

/ˈmeɪtrɪks/

n.矩阵;模型;

负数形式: matrices

Specifically, lists don’t represent vectors/matrices as in MATLAB

具体来说,列表并不像 MATLAB 中那样表示向量/矩阵

portfolio

/pɔːrtˈfoʊlioʊ/

词根词缀: -port-运输,携带 + folio树叶,纸张


Python - 1.5 Lists & 1.6 File
https://jackiedai.github.io/2024/09/23/002english/Python-1.5/
Author
lingXiao
Posted on
September 23, 2024
Licensed under