搜尋此網誌

2026年6月23日星期二

天水圍公園的睡蓮

 

光圈先決︰f/6.3

ISO 200

快門︰1/500 秒

因相片等效焦距為 216mm,怕不夠光,所以將 ISO 調至 200。雖然 ISO 200 Noise 絕對不明顯,但相機將快門設定為 1/500 秒,根本沒有需要這麼快,下次可嘗試用 ISO 100.

2026年6月22日星期一

心理捷思法

malicious: having or showing a desire to harm somebody or hurt their feelings, caused by a feeling of hate

cascade: a number of things happening, in which each one leads to another

intrusive: too direct, easy to notice, etc. in a way that is annoying or upsetting

dwelling: a house, flat, etc. where a person lives

heuristics: a method of solving problems by finding practical ways of dealing with them, learning from past experience

心理捷思法(mental heuristics)在心理學中指的是一種快速、簡化的思考方式,用來幫助我們在有限時間與資訊下做決策。它能節省心力與時間,但也可能導致偏差或錯誤判斷。

Microsoft Copilot

revert: to come or go back (as to a former condition, period, or subject)

compelled: having to do something, because you are forced to or feel it is necessary

ingrained (in somebody/something) (of a habit, an attitude, etc.) that has existed for a long time and is therefore difficult to change

panoramic: with a view of a wide area of land

demoralizing: making somebody lose confidence or hope

huff: to say something or make a noise in a way that shows you are offended or annoyed

ditch: to get rid of something/somebody because you no longer want or need it/them

groundwork: work that is done as preparation for other work that will be done later

delve: to reach inside a bag, container, etc. to search for something

Nicole Vignola "Rewire"

hk.dictionary.search.yahoo.com

oxfordlearnersdictionaries.com

merriam-webster.com

dictionary.cambridge.org

2026年6月21日星期日

Shaping a child

mannerism: a particular habit or way of speaking or behaving that somebody has but is not aware of

Venezuela: country (a republic) bordering the Caribbean Sea in northern South America; capital Caracas area 352,144 square miles (912,050 square kilometers), population 31,869,000

tribe: a social group in a traditional society consisting of people with the same language, culture, religion, etc., living in a particular area and often having one leader known as a chief

Ye'kuana: a Cariban-speaking tropical rain-forest tribe

weird: very strange or unusual and difficult to explain

sentiment: a feeling or an opinion, especially one based on emotions

What a weird sentiment it is to think that as adults we have the ability to mould and shape a child to become who they will be in their adulthood, and most of the time we do not even realize we are doing it.

Nicole Vignola "Rewire"

孩子不是被動接受者,而是透過與成人的互動建構內在模式(internal working model),這會影響他們未來的人際關係與自我認知。

Microsoft Copilot

2026年6月17日星期三

Rumination

neurodivergent: differing in mental or neurological function from what is considered typical or normal (frequently used with reference to autistic spectrum disorders); not neurotypical

nuanced: ​with very slight differences in meaning or expression

rampant: existing or spreading everywhere in a way that cannot be controlled

Suggestibility is a psychological trait where an individual easily accepts and acts upon ideas, opinions, or information suggested by others, often without critical analysis.

groggy: weak and unsteady on the feet or in action

If someone or something is hardwired to do a particular thing, they automatically do it and cannot change that behavior.

modality: the particular way in which something exists, is experienced or is done

We are not born with low self-esteem and ruminating thoughts.

Microsoft Copilot Explanation:

人際敏感度高者容易把別人的反應內化為自我評價,進而反覆思考。

記錄思維:寫下反覆出現的想法,標註證據與反證,練習以不同角度詮釋。

Nicole Vignola "Rewire"

hk.dictionary.search.yahoo.com

oxfordlearnersdictionaries.com

merriam-webster.com

dictionary.cambridge.org

Brief and Concise

for n in range(1, 101):
    if n % 15 == 0:
        print('Yeah')
    elif n % 3 == 0:
        print('Yo')
    elif n % 5 == 0:
        print('Hey')
    else:
        print(n)

['Yeah' if n % 15 == 0 else 'Yo' if n % 3 == 0 else 'Hey' if n % 5 == 0 else n for n in range(1, 101)]

Python Course

Set

numbers = set([1, 2, 2, 3])

Square brackets [] in above example are just creating a list before converting it into a set.

Role of Square Brackets
  • [1, 2, 2, 3] → this is a list literal in Python.

  • Lists can contain duplicates and preserve order.

  • Then set([...]) takes that list and removes duplicates, giving {1, 2, 3}.

So the square brackets are not part of the set itself — they’re simply defining the list that you pass into set().

Microsoft Copilot

2026年6月16日星期二

健腦

perpetuate: to make something such as a bad situation, a belief, etc. continue for a long time

ingrained: (of a habit, an attitude, etc.) that has existed for a long time and is therefore difficult to change

concerted: done in a planned and determined way

Research shows that older people who remain physically active throughout old age have more proteins in the brain that keep the connections between the neurons strong and healthy.

rumination: the act of thinking deeply about something; deep thoughts about something

exhume: dig up

dismantle: the act of thinking deeply about something; deep thoughts about something

Nicole Vignola "Rewire"

如果年紀大了還常常運動,腦袋裡的「連接」會比較健康。

這些連接就像電線,把腦細胞連在一起。

運動能幫助腦袋製造更多「保護電線的材料」,讓腦細胞之間的訊息傳得更快、更清楚。

「保護電線的材料」不是髓鞘,而是另一類叫做突觸蛋白。它們不是包住神經的,而是幫助腦細胞之間的「接頭」更牢固,讓訊息在細胞之間傳遞得更好。

Microsoft Copilot

Polymath

consummate: ​showing great skill; perfect

polymath: ​a person who knows a lot about many different subjects

gusto: enthusiasm and energy in doing something

knock out: to surprise and impress somebody very much

lurch: to make a sudden, unsteady movement forward or to one side

Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

2026年6月15日星期一

植物特寫

以三腳架 + 低 ISO + 小一點光圈 + 手動白平衡拍攝植物特寫

建議起始設定

拍攝模式:M 模式,方便固定曝光。

ISO:100,盡量保持最低以減少雜訊。

光圈:f/8 到 f/11,通常最實用;植物特寫要兼顧清晰度和景深,這個範圍較穩。

快門:有三腳架可先由 1/10s 到 1s 試拍,再看曝光是否足夠;如果植物會微微擺動,就要再加快。

對焦:單點 AF 或直接手動對焦,對在你最想清楚的位置,例如花蕊、葉脈、露珠邊緣。

影像防震:上三腳架時可關閉鏡頭 IS,避免防震系統在長曝下反而造成輕微抖動。

白平衡:室內有燈光,先用 AWB 試拍;如果顏色偏黃或偏綠,改用 鎢絲燈 / 白光管。

鏡頭焦段怎樣用

50mm 到 135mm 比較適合植物特寫,畫面會更自然,背景也更容易壓乾淨。

如果你想突出單一葉片、花朵局部,先試 85mm 到 135mm。

18mm 到 35mm 也能拍,但容易把背景和白布一起拍得太多,特寫感會弱一些。

室內白背景要注意

光線最好用柔光,例如燈照向白牆、柔光布、或反射到白紙板,避免葉面反光太硬。植物攝影也常靠穩定三腳架和適當控光來保細節。

拍攝小技巧

用 2 秒自拍或遙控,減少按快門震動。

背景白但不要過曝成一大片死白,保留一點層次會更好看。

若葉面反光明顯,可以稍微改變燈角度,比單純後製更有效。

Perplexity.ai

M mode

ISO:100

135mm*1.6 = 216mm

f/9

0.5s

2026年6月11日星期四

Similar pronunciation

incense

  • IPA[ɪnˈsens]

insane

IPA[ɪnˈseɪn]

Similar words

shawl IPA[ʃɔːl]

披肩

scarf IPA[skɑːf]

圍巾

A scarf (圍巾) is usually long and narrow, worn around the neck for warmth or style, while a shawl (披肩) is larger and wider, draped over the shoulders or upper body for coverage and elegance.

Microsoft Copilot

2026年6月10日星期三

Chapter Quiz

In Python, a defaultdict is a special kind of dictionary from the collections module. Its main advantage is that it automatically provides a default value for any key that doesn’t exist yet, instead of raising a KeyError.

You create it by passing in a default factory function (like int, list, or set).

When you access a missing key, defaultdict calls that factory to create a default value and stores it under that key.

In Python, the get() function is a method of dictionaries. It’s used to safely retrieve the value for a given key without risking a KeyError if the key doesn’t exist.


In Python, a set is a built‑in data type that represents an unordered collection of unique elements. Think of it like a mathematical set: no duplicates, and order doesn’t matter.

Unique elements only → duplicates are automatically removed.

Unordered → items don’t have a fixed position or index.

Mutable → you can add or remove elements.

Fast membership tests → checking if something is in a set is very efficient.

# Using curly braces fruits = {"apple", "banana", "cherry"} # Using the set() constructor numbers = set([1, 2, 2, 3]) print(numbers) # {1, 2, 3} (duplicates removed)


In Python, item[1:3] is an example of list slicing (or sequence slicing).

item is assumed to be a list (or another sequence like a string or tuple).

[1:3] means:

    Start at index 1 (the second element, since Python uses zero‑based indexing).

    Stop before index 3 (so it includes elements at positions 1 and 2, but not 3).

In Python, item[1:] is another example of slicing.

1: means start at index 1 (the second element, since indexing starts at 0).

The colon without an end index means go all the way to the end.

So item[1:] returns everything from index 1 onward.


A nested list comprehension in Python is simply a list comprehension inside another one. It’s often used to flatten lists, generate combinations, or apply transformations across multiple levels of data.

[expression for outer in iterable1 for inner in iterable2]

The outer loop runs first, then the inner loop.

You can nest more than two loops if needed.

To apply a function someFunc to all comments in a list of blog objects using a nested list comprehension

[[someFunc(comment) for comment in blog.comments] for blog in blogs]

Outer loopfor blog in blogs → iterate through each blog object.

Inner loopfor comment in blog.comments → iterate through each comment in that blog.

ExpressionsomeFunc(comment) → apply your function to each comment.

Result → a list of lists, where each inner list contains the processed comments for one blog.

def someFunc(text): return text.upper() class Blog: def __init__(self, comments): self.comments = comments blogs = [ Blog(["Nice post!", "Great read"]), Blog(["Interesting idea", "Could be improved"]), Blog(["Loved it", "Thanks for sharing"]) ] processed = [[someFunc(comment) for comment in blog.comments] for blog in blogs] print(processed)

Result:
[['NICE POST!', 'GREAT READ'], ['INTERESTING IDEA', 'COULD BE IMPROVED'], ['LOVED IT', 'THANKS FOR SHARING']]

  • __init__ → the special method that runs automatically when you create a new object from the class.

  • self → refers to the new object being created.

  • comments → a parameter you pass in when creating the object.

  • self.comments = comments → stores the passed‑in value as an attribute of the object, so you can access it later.

class Blog: def __init__(self, comments): self.comments = comments # Create a Blog object with a list of comments blog1 = Blog(["Nice post!", "Great read"]) print(blog1.comments) # ['Nice post!', 'Great read']

  • When you call Blog(["Nice post!", "Great read"]), Python automatically calls __init__.

  • The comments list is passed in and stored as self.comments.

  • Now the object blog1 has an attribute comments you can use anywhere.


list(range(101))[::5]

range(101) → generates numbers from 0 up to 100 (inclusive).

So list(range(101)) = [0, 1, 2, 3, ..., 100].

[::5] → slice syntax with:

start = empty → defaults to beginning (0).

stop = empty → defaults to end (100).

step = 5 → take every 5th element.

Result → all multiples of 5 between 0 and 100.


list(range(101))[::-5]

Step 1: Build the list

list(range(101)) → [0, 1, 2, 3, ..., 100]

Step 2: Understand the slice

The slice is [::-5], which means:

start → empty → defaults to the end of the list.

stop → empty → defaults to the beginning.

step = -5 → move backwards, taking every 5th element.


Microsoft Copilot

Cons of social media

William James said, "Our life experience will equal what we have paid attention to, whether by choice or by default."

我們的人生經驗,將等同於我們所注意到的事物,無論是出於選擇還是無意之中。

我們所注意到的事物不只是外在事件,也包括我們的想法、情緒、人際互動、習慣與重複的觀察。換句話說,注意力決定了哪些事物被放大、被記住、被內化。

如果你經常刻意練習感恩、關注身邊的美好,你的生活經驗會偏向正面與滿足。如果你習慣性地沉迷於負面新聞或無止境的社群媒體滾動,即使沒有刻意選擇,你的人生感受也會變得焦慮或空虛。

注意力就是資源:有意識地選擇把注意力放在哪裡,就能改變你未來的回憶與感受。
管理環境與習慣:減少無意的干擾,建立有意的練習(如專注、閱讀、深度交流),能讓人生經驗更符合你想要的樣子。

Microsoft Copilot

Nicole Vignola "Rewire"

Part II of Python Test

def decodeString(encodedList):
    decodedStr = ''
    for item in encodedList:
        decodedStr = decodedStr + item[0] * item[1]
    return decodedStr

1. Start with an empty string: decodedStr = ''

2. Loop through each (char, count) tuple in encodedList.

3. Multiply the character by its count:

item[0] * item[1]

Example: 'a' * 3 → "aaa".

4. Concatenate to decodedStr.

5. Return the final reconstructed string.

Microsoft Copilot

Be water

如水柔順,如水堅強,方可如水無孔不入、無堅不摧。

在人際關係中,要懂得柔軟、包容。

在挑戰困境時,要保持堅毅、持續。

在策略上,要懂得靈活變通,找到突破口。

Boss without insight

outlier: a person or thing that is different from or in a position away from others in the group

brim: to be full of something

underscore: ​to emphasize or show that something is important or true

chalk up: ​(informal) to achieve or record a success, points in a game, etc.

to trip over something: to fall over, to stumble on, to slip on something

spill out: ​to tell somebody all about a problem etc. very quickly; to come out quickly

goad: ​to keep annoying somebody/something until they react

scrap something: to cancel or get rid of something that is no longer practical or useful

cotton candy: ​a type of sweet in the form of a mass of sticky threads made from melted sugar and served on a stick, especially at fairgrounds

if a computer crashes or you crash a computer, it stops working suddenly

spawn: to cause something to develop or be produced

rightfully: according to the law or to what is right or correct

flawed: having a flaw; not perfect or correct

horde: a large crowd of people

boomerang: if a plan boomerangs on somebody, it hurts them instead of the person it was intended to hurt

Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

2026年6月9日星期二

對人的工作

大主管將我投閒置散,我這個小主管怎都要做一些事情。內地姐姐離職,樓下 Pop-up Store 工作環境有改善,正是時機。天下武功,唯快不破。小朋友不明白我便解釋給他聽。小朋友問我為什麼不私下與大主管商討人手安排,而選擇一開始便在群組提議,認為我以下犯上,架空權力。可是,小朋友沒有想到私下商討失敗了,再在群組反抗會有什麼後果。區經叫我和大主管多溝通,面對面是行不通的,因為大主管經常扮失憶,要用文字溝通,要有根有據。區經說 Pop-up stores 可交給彩虹姐姐 Run, 叫我多專注主舖的工作。在群組提議了,就算大主管沒有接納,區經都知道發生什麼事。題外話,大主管放假的時候會吩咐我做一些工作。上班要完成上司給我的工作十分正常,但問題是大主管會遙控彩虹姐姐,監察我的工作情況。被監察的我,一點也不好受。對著時常設陷阱的主管,對人的工作,心很累。

2026年6月8日星期一

"Haven't"〈Yoasobi feat. Lee Suhyun〉


連淚水都沒流下
度過的日子連一絲痕跡也沒留下
 「再見了」

一個獨自迎接的早晨
迴響著某個人的聲音
在兩人曾一同度過的房間裡
依然閉著雙眼思索

犯錯的是誰?
我不知道啊
誰都沒有錯吧!
或許

我們不論經歷多少次
對,不論過了多少年也必定
都只會隨著「再見」而畫上句號
這也是沒辦法吧 一定
「歡迎回家」
不經意脫口而出的這句話
感覺不對吧

一個獨自迎接的早晨
忽然想起某個人的事
兩人一同度過的日子裡
理所當然地殘留著

犯錯的是你
是這樣嗎?
犯錯的是我
或許吧!

這也就是世俗平庸的戀愛吧
那便是最終的答案了
我們漸漸地產生了分歧
這也不過是常有的、聽慣了的故事罷
就連那般閃耀著光芒的日子
也終究會蓋滿灰塵

我們不論經歷多少次
對,不論過了多少年也必定
都會走向「再見」的道路
這也是沒辦法吧 一定
「歡迎回家」
像往常一樣 衝出了口

無法互相理解的事
不論多少一定會有吧
畢竟我們不可能包容彼此的所有
然而,要是你感覺到那些溫柔的日子
漸漸變成痛苦的日子的話
那就再也回不去了

我們不論經歷多少次
我們不論經歷多少次
不論過了多少年也必定
都只會隨著「再見」而畫上句號
這也是沒辦法的吧 一定
「歡迎回家」
不經意脫口而出的這句話
感覺不對吧

即使如此 不論經歷多少次
對,不論過了多少年也必定
如果還能回到最初的話……
不禁產生了這樣的想法
「歡迎回家」
對這句無法傳達的話語
露出了苦笑
是一個有些寒冷的早晨

2026年6月4日星期四

仲夏

今年仲夏(6–8月)香港預料會比常年偏熱,天文台指出全年平均氣溫「偏高」,並有較高機會進入歷史前十名;媒體與專家估計市區最高溫可能逼近或超過38°C(HKO)。城市熱島效應會令市區比郊區高 約 3–4°C,屯門相對新界內陸或山區仍會感到悶熱但略低於市中心。

Microsoft Copilot

香港今年仲夏(大約6至8月)大機會偏熱,天文台最新季節預報亦指出2026年6月至8月香港氣溫「高於正常」而雨量「正常至偏少」的機會稍高。

perplexity.ai and HKO

根據香港天文台最新的季度預報,在氣候持續暖化與厄爾尼諾現象等多重因素影響下,預料香港今年仲夏(6月至8月)的氣溫會高於正常,且全年平均氣溫有很大機會躋身歷史最高首十位。

gemini.google.com

2026年6月2日星期二

Part I of Python test

def encodeString(stringVal):

    encodedList = []

    prevChar = stringVal[0]

    count = 0


    for char in stringVal:

        if prevChar != char:

            encodedList.append((prevChar, count))

            count = 0

            prevChar = char

        count = count + 1


    encodedList.append((prevChar, count))

    return encodedList


Step 1: Setup

  • encodedList = [] → empty list to store results.

  • prevChar = stringVal[0] → start with the first character of the string.

  • count = 0 → counter for consecutive occurrences.


Step 2: Loop through each character

for char in stringVal:

Goes through every character in the string one by one.


Step 3: Check if the character changes

if prevChar != char:
    encodedList.append((prevChar, count))
    count = 0
    prevChar = char

If the current character is different from the previous one:

  • Save the previous character and its count into encodedList.

  • Reset count to 0.

  • Update prevChar to the new character.

  • When you hit a character change, you first append the tuple (prevChar, count) to encodedList.

  • At that moment, the value of count is already finalized for that run (e.g., 3 for 'a').That tuple is stored in the list and won’t be touched again

  • After saving, you reset count = 0 because you’re about to start counting a new run for the next character.

  • This reset only affects future counting, not the already-saved tuple.


Step 4: Count occurrences

count = count + 1

Always increment the counter for the current character.


Step 5: Add the last group

encodedList.append((prevChar, count))

After the loop finishes, add the final character group to the list.


Step 6: Return result

return encodedList

The function returns the list of (character, count) tuples.

Take "aaabbc" as input:

  1. Start: prevChar = 'a', count = 0

  2. Loop:

    • 'a' → same as prevCharcount = 1

    • 'a' → same → count = 2

    • 'a' → same → count = 3

    • 'b' → different!

      • Save ('a', 3)

      • Reset count = 0

      • Update prevChar = 'b'

      • Then increment → count = 1

    • 'b' → same → count = 2

    • 'c' → different!

      • Save ('b', 2)

      • Reset count = 0

      • Update prevChar = 'c'

      • Then increment → count = 1

  3. End of loop → Save ('c', 1)

Result: [('a', 3), ('b', 2), ('c', 1)]


Microsoft Copilot

Naughty

catnap: a short sleep

pickled: (of food) preserved in vinegar

chile con queso: (in Tex-Mex cooking) a thick sauce of melted cheese seasoned with chilli peppers, typically served warm as a dip for tortilla chips

bequeath: pass (something) on or leave (something) to someone else

Plymouth was a beloved American automobile brand produced by the Chrysler Corporation from 1928 until 2001.

tow: to pull a car, boat, etc. behind another vehicle, using a rope or chain

junkyard: a place where old cars, machines, etc. are collected, so that parts of them, or the metal they are made of, can be sold to be used again

a chunk of: (informal) a fairly large amount of something

fetch: to go to where somebody/something is and bring them/it back

cruising: (of a car, etc. or its driver) to drive along slowly, especially when you are looking at or for something

rear-wheel drive: a system in which power from the engine is sent to the back wheels of a vehicle

fishtail: if a vehicle fishtails, the back end slides from side to side

joyriding: the crime of stealing a car and driving it for pleasure, usually in a fast and dangerous way

barbed wire: strong wire with short sharp points on it, used especially for fences

bail out: to escape from a situation that you no longer want to be involved in

pint: a pint of beer (especially in a pub)

foible: a silly habit or a strange or weak aspect of a person’s character that is not considered serious by other people

frenzy: a state of great activity and strong emotion that is often violent or frightening and not under control

attribute something to something: to say or believe that something is the result of a particular thing

intimidate: to frighten or threaten somebody so that they will do what you want

deferential: showing that you respect somebody/something, especially somebody older or more senior than you

"To get a kick out of" is an idiom that means to really enjoy something, or to get a strong feeling of excitement and pleasure from doing or experiencing it.

bemused: showing that you are confused and unable to think clearly

bide: to stay or live in a place

insubordination: the act of refusing to obey orders or show respect for somebody who has a higher rank

Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

Google AI overview

2026年5月28日星期四

Dictionary Comprehensions in Python

Revision:

In Python, lists, tuples, sets, and dictionaries are all built-in data structures, but they differ in mutability, ordering, and how they store data. Lists and dictionaries are mutable, tuples are immutable, and sets enforce uniqueness. Dictionaries store key–value pairs, while the others store single values.

List: [ ]

Tuple: ( )

Set: { } or set()

Dictionary: {key: value}


myList = [1,2,3,4,5]

[2*item for item in myList]

This a list comprehension, not a for loop.

In a for ... in loop, the colon (:) is mandatory because it introduces a block of indented code.

for item in myList:

    print(2*item)


We can use any valid variable name instead of "item" in a for ... in loop or a list comprehension. The name is just a placeholder that represents each element in the sequence while iterating.

What is a Key–Value Pair?

A dictionary is like a real-world dictionary:
Key = the word you look up.
Value = the definition you get.

In Python:
Key must be unique and immutable (string, number, tuple).
Value can be anything (string, number, list, another dict, etc.).

person = {
    "name": "Alice",
    "age": 25,
    "city": "Hong Kong"
}

"name" → key, "Alice" → value
"age" → key, 25 → value
"city" → key, "Hong Kong" → value

animalList = [('a', 'anteater'), ('b', 'bear'), ('c', 'cat'), ('d', 'dog')]
animals = {item[0]: item[1] for item in animalList}
animals

List of tuples
[('a', 'anteater'), ('b', 'bear'), ('c', 'cat'), ('d', 'dog')]

Each tuple has two elements:
item[0] → the key (like 'a')
item[1] → the value (like 'anteater')

Dictionary comprehension
{item[0]: item[1] for item in animalList}

Loops through each tuple in animalList.
Uses the first element (item[0]) as the key.
Uses the second element (item[1]) as the value.

{'a': 'anteater', 'b': 'bear', 'c': 'cat', 'd': 'dog'}

>>> animalList = [('a', 'anteater'), ('b', 'bear'), ('c', 'cat'), ('d', 'dog')]
>>> animals = {key: value for key, value in animalList}
... animals
...
{'a': 'anteater', 'b': 'bear', 'c': 'cat', 'd': 'dog'}

animals.items()
dict_items([('a', 'anteater'), ('b', 'bear'), ('c', 'cat'), ('d', 'dog')])
Asking Python to give you all the key–value pairs in the dictionary.

list(animals.items())
[('a', 'anteater'), ('b', 'bear'), ('c', 'cat'), ('d', 'dog')]

A list comprehension that builds a list of dictionaries from your animals dictionary
[{'letter': key, 'name': value} for key, value in animals.items()]

animals.items()
Produces key–value pairs like:
('a', 'anteater'), ('b', 'bear'), ('c', 'cat'), ('d', 'dog')

Looping with for key, value in animals.items()
Each iteration unpacks the tuple into key and value.

Dictionary inside the comprehension
For each pair, you create a new dictionary:
{'letter': key, 'name': value}

Result:
[{'letter': 'a', 'name': 'anteater'}, {'letter': 'b', 'name': 'bear'}, {'letter': 'c', 'name': 'cat'}, {'letter': 'd', 'name': 'dog'}]

Microsoft Copilot

Startup Company

bear down on: to move quickly toward someone or something in a determined way

get something off the ground: to start happening successfully; to make something start happening successfully

payroll: a list of people employed by a company showing the amount of money to be paid to each of them

mundane: not interesting or exciting

monte: a card game

viable: that can be done; that will be successful

topology: a branch of mathematics concerned with those properties of geometric configurations (such as point sets) which are unaltered by elastic deformations (such as a stretching or a twisting) that are homeomorphisms

disabuse somebody (of something) to tell somebody that what they think is true is, in fact, not true

Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

www.merriam-webster.com

2026年5月26日星期二

西九文化區日落美景

 

Aperture Priority (光圈先決): f/9

ISO: 100

(Shutter Speed) 快門: 1/100 second

Focal Length (焦距): 135mm

Equivalent Focal Length (等效焦距): 216mm

Tripod Used and Image Stabilizer Off

White Balance (白平衡): Shade (陰影模式)

效果:相機會自動加暖色調,橘色比肉眼看更明顯

負曝光補償(Exposure Compensation): -1ev

Landscape Picture Style (Contrast: +1, Saturation: +1)

Evaluative Metering (權衡式測光)

Safety Precautions of Tripod Usage

Manfrotto MKBFRTA4GT-BH

Designed for the advanced travel photographer, this tripod is extremely portable and solid. Ideal for mirrorless cameras or medium format DSLRs.

Key features:

  • Side-pull leg angle selector for fast adjustment
  • Legs can be independently set at 3 angles of spread
  • Ball head for quick and easy framing
  • Rubber leg warmer (pads for camera tripod legs) for comfortable grip
  • Easy link socket for arms and other accessories
  • Fast and secure twist lock system
  • Counterweight hook for extra stability and strap attachment
      Set Up

Unfold the legs as shown in figure 1.
Open the 3 tripod legs. To adjust the tripod's height, release the telescopic extensions on each leg by rotating Twistlock "A" about a quarter of a turn.

You should open the proximal (top) twist‑lock first, then the distal (lower) sections, when extending the legs.

      Leg Angle Adjustment

Each leg can be set independently at any of the 3 angles of spread. To change the angle on a leg, close the leg slightly towards the center column and press down the locking button "W" at the top of the leg. While pressing the button, select the new leg angle and then release button "W" to lock in position, then open the leg fully again. The angle of each leg can be adjusted independently of the other two legs.

Warning: During this procedure, please take care not to insert your fingers inside the central aperture on the spider collar.

     Adjusting Center Column Height

To release the center column "C", unlock gear "D" and adjust the height of the column as required. Tighten gear "D" to lock the column in position.

     Fitting the Quick Release Plate to the Camera

Fix plate "G" to the base of the camera by tightening camera screw in the camera's threaded tripod hole using the ring "Q" WITHOUT APPLYING FORCE. Before fully locking, align the plate "G" with the camera lens. Please ensure you have securely fastened plate "G" to the camera before use. Once fastened, push ring "Q" down so that it lies flat against the plate "G".

    Mounting the Camera on the Head

To mount the camera on the head, open lever "H" while pushing safety catch "X" down, holding them both in the open position whilst attaching the camera by slotting camera plate "G" into the top of the head as shown in figure 5. Release lever "H" and safety catch "X".

Warning: Make sure that the camera is securely locked to the head by pushing lever "H" against plate "G" (Figure 6) and checking that the camera does not move in the head.
From my practical usage experience, lever "H" cannot be completely pushed against plate "G". The reason is the indicated orientation (arrow towards lens) of the plate "G" is reversed.

    Use

The head has independent panoramic and tilt movement.
The lever "F" locks the panoramic movement.
To release the movement, unlock lever "F" by rotating anticlockwise.
Once the desired position is achieved, lock the head by turning lever "F" fully clockwise.

Warning: The lever "P" locks the ball's movement. To ensure safety when using the ball head, always hold the camera with one hand while releasing the ball.

To release the ball "L" when positioning the camera, unlock lever "P" by rotating anticlockwise.
Once the desired position has been reached, lock the ball "L" by turning lever "P" by rotating fully clockwise.
The head features independent fiction adjustment on the ball movement, which makes it easier to position the head before locking it. To adjust the fiction, ensure the ball "L" is not locked. Then hold the camera in one hand and rotate knob "N" clockwise to increase friction. Friction does not lock the camera: we recommended locking the ball "L" by turning the lever "P" fully.

Tripod Manual
Microsoft Copilot
Perplexity AI

2026年5月20日星期三

Software for chip

Bill Gates and Paul Allen kick-started the personal computer revolution by writing Altair BASIC in 1975 to run on the Altair 8800. This software was the first product of their newly formed company, Microsoft.

Stephen Gary Wozniak is an American technology entrepreneur, electrical engineer, computer programmer, and inventor. In 1976, he co-founded Apple Computer (now Apple Inc.) with his early business partner Steve Jobs. Through his work at Apple in the 1970s and 1980s, he is widely recognized as one of the most prominent pioneers of the personal computer revolution.

The Homebrew Computer Club was an early computer hobbyist group in Menlo Park, California, which met from March 1975 to December 1986.

Monte Davidoff is an American computer programmer who was one of the first employees of Microsoft.

couch: a long piece of furniture like a bed, especially in a doctor’s office

rug: a piece of thick material like a small carpet that is used for covering or decorating part of a floor

Traf-O-Data was a business partnership founded in 1972 by Bill Gates, Paul Allen, and Paul Gilbert. The company aimed to read raw data from roadway traffic counters and process it into usable reports for traffic engineers.

reams: reams [plural] (informal) a large quantity of writing

dividend: ​an amount of the profits that a company pays to people who own shares in the company

realm: an area of activity, interest or knowledge

exclusive: only to be used by one particular person or group; only given to one particular person or group

royalty: a sum of money that is paid to somebody who has written a book, piece of music, etc. each time that it is sold or performed

cap at: set as the upper limit

sublicense: a license granted to a third party by a licensee, extending some rights or privileges that the licensee enjoys

viable: feasible; that can be done; that will be successful

ruminate: to think deeply about something

confide: to tell somebody secrets and personal information that you do not want other people to know

goof around: (especially North American English, informal) to spend your time doing silly or stupid things

Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

Google AI Overview

en.wikipedia.org

2026年5月19日星期二

Histogram in Photography

A photography histogram is a graphical representation of an image's tonal values. It displays how pixels are distributed across brightness levels, from pure black on the far left to pure white on the far right. It is an essential tool for evaluating exposure and preventing overexposure or underexposure.

How to Read the Histogram

The horizontal axis (x-axis) represents the brightness of pixels, while the vertical axis (y-axis) represents the number of pixels at that specific brightness.

Left Side (Shadows): Represents pure blacks and dark tones. A spike here means you have dark shadows, but if the graph hits a wall on the far left, you are "crushing" the blacks and losing shadow details.

Middle (Midtones): Represents the middle grays and average light levels in your scene.

Right Side (Highlights): Represents pure whites and bright areas. If the graph hits the right-side wall, you are "clipping" or "blowing out" your highlights (e.g., turning a bright sky into a solid, unrecoverable white).

Common Histogram Shapes

Different types of scenes produce distinct histogram profiles:

High-Key Scene: A bright, airy scene (like a snowfield) will have a histogram heavily weighted toward the right.

Low-Key Scene: A dark, moody scene (like a night cityscape) will have the histogram weighted toward the left.

Balanced Scene: A scene with a good mix of light and shadows will have a bell-curve shape, ideally keeping all data contained within the boundaries.

Google AI overview

List comprehensions

List comprehensions in Python are a concise way to build new lists by looping through an iterable, applying an expression, and optionally filtering with conditions—all in a single line. They are faster and more readable than traditional for loops for simple transformations.

nums = [1, 2, 3, 4]

squares = [n**2 for n in nums]

print(squares)   # [1, 4, 9, 16]


nums = [1, 2, 3, 4, 5, 6]

evens = [n for n in nums if n % 2 == 0]

print(evens)   # [2, 4, 6]

>>> myList = list(range(100))
... filteredList = [item for item in myList if item % 10 == 0]
... print(filteredList)
...
[0, 10, 20, 30, 40, 50, 60, 70, 80, 90]

>>> hisString = 'His name is Samson. He lives in Tuen Mun'
>>> hisString.split('.')
['His name is Samson', ' He lives in Tuen Mun']

>>> hisString.split()
['His', 'name', 'is', 'Samson.', 'He', 'lives', 'in', 'Tuen', 'Mun']

>>> def cleanWord(word):
...         return word.replace('.', '').lower()
...    [cleanWord(word) for word in hisString.split()]
...
['his', 'name', 'is', 'samson', 'he', 'lives', 'in', 'tuen', 'mun']

Outer square brackets [...]

Define that the result will be a list.

Without them, you’d have a generator expression instead (which doesn’t immediately build a list).

.lower()
Converts the string to lowercase.
Ensures consistency (e.g., "Samson" → "samson").

>>> [cleanWord(word) for word in hisString.split() if len(cleanWord(word)) < 3]

['is', 'he', 'in']

word → is a string (e.g., "he", "is", "mun").

You cannot directly compare a string to a number (word < 3) because Python doesn’t know how to order a string against an integer.

Doing so would raise a TypeError.

len(cleanWord(word)) → is an integer (the number of characters in the cleaned word).

This can be compared to another integer (< 3) safely.

Example: "he" → len("he") = 2 → 2 < 3 ✅


Nested list comprehension

>>> [[cleanWord(word) for word in sentence.split()] for sentence in hisString.split('.')]
[['his', 'name', 'is', 'samson'], ['he', 'lives', 'in', 'tuen', 'mun']]

Outer comprehension:
[ ... for sentence in hisString.split('.')]
Splits hisString into sentences using "." as the delimiter (定界符).
Iterates over each sentence.
For each sentence, it produces a list of cleaned words.

Inner comprehension:
[cleanWord(word) for word in sentence.split()]
Splits the current sentence into words (default split on whitespace).
Applies cleanWord(word) to each word.
Produces a list of cleaned words for that sentence.

Inner brackets → build a list of cleaned words per sentence.
Outer brackets → collect those lists into one big list.
Together → you get a nested list comprehension that structures text into sentences → words → cleaned words.

The variable sentence is a string (str).

Microsoft Copilot

拍攝夕陽西下的法門

White Balance: Shade

效果:相機會自動加暖色調,橘色比肉眼看更明顯。

進行負曝光補償(exposure compensation)。

978-957-106-0873

The Canon EOS 1500D does not include a built‑in “Vivid” Picture Style. You can get very close to a “Vivid” look on the EOS 1500D by using the built-in Landscape Picture Style, then pushing a few settings a little further:

Sharpness: raise it a little if the image still feels soft.

Contrast: +1 or +2.

Saturation: +1 or +2.

Color tone: leave at 0 unless the colors start looking unnatural.

For your Canon EOS 1500D with the EF-S 18-135mm f/3.5-5.6 IS USM, start with Aperture Priority (Av), f/8 to f/11, ISO 100, and set white balance to shade for warmer sunset tones. A good starting point after the sun is hidden by the hill is to meter for the bright sky and then dial in about -1 EV to -2 EV exposure compensation to keep the colors rich and avoid a washed-out scene.

Evaluative Metering
在攝影中,矩陣模式(Matrix Metering),通常也被稱為評價測光(Evaluative Metering)、多區測光或平均測光,是現代數碼相機中最智能化、最常用的測光模式。

Once the sun is fully behind the hill, the scene usually gets darker fast, so the camera will choose a slower shutter speed in Av mode. Using a tripod, keep ISO at 100 and let the shutter slow down. This matches common sunset shooting practice of using smaller apertures and controlling exposure with shutter speed.

With advanced skill, manual mode can be utilized. With a tripod, you can use a much slower shutter and get cleaner sunset color. Settings: f/8 to f/11, ISO 100, and a shutter speed around 1/4s to several seconds depending on brightness. Set the white balance to shade. Focus on the hill edge or a distant subject using manual focus. Image stabilizer has to be turned off when the tripod is used.

www.perplexity.ai

Fujifilm X-A2
16mm (APS-C, Crop factor: 1.5x)
Scene Mode: Sunset
f/8, 1/125s, ISO 200
March 30, 2017

2026年5月14日星期四

Dictionaries in Python

In Python, you can safely use a trailing comma in dictionaries (and other collections like lists, tuples, and sets).

my_dict = {

    "x": 10,

    "y": 20,

}

In Python, dictionary keys have some important rules and behaviors.

animals = {
    'a': 'ape',
    'b': 'bear',
    'c': 'cat',
}
animals.keys()

Output: dict_keys(['a', 'b', 'c'])

animals.values()

Output: dict_values(['ape', 'bear', 'cat'])


list(animals.keys())

Output: ['a', 'b', 'c']

animals.get('a')

Output: 'ape'


animals = {
    'a': ['ape', 'abalone'],
    'b': ['bear'],
}

Each key ('a', 'b') maps to a list of values.

This means you can store multiple animals under the same starting letter.

animals['b'].append('bat')

You’re accessing the list stored under key 'b' → currently ['bear'].

.append('bat') adds 'bat' to that list.

.append() modifies the list in place (it doesn’t return a new list).

if 'c' not in animals:
    animals['c'] = []
    
animals['c'].append('cat')

Check if key 'c' exists

if 'c' not in animals: → looks for 'c' in the dictionary keys.
If 'c' is missing, it creates a new entry with an empty list

Append 'cat' to the list

Now animals['c'] is an empty list [].

.append('cat') adds 'cat' to that list.

defaultdict is a special type of dictionary from Python’s collections module. It works just like a normal dictionary, but with one big advantage: if you try to access a key that doesn’t exist, it automatically creates it with a default value instead of raising a KeyError.

from collections import defaultdict
>>> animals = defaultdict(list)
>>> animals

Output:
defaultdict(<class 'list'>, {})

This is the string representation (__repr__) of a defaultdict object.

Inside the angular brackets < >, Python is showing you the default factory function used to create missing values.

<class 'list'> means: whenever you access a missing key, Python will automatically create a new empty list for it.

The {} part after the comma is the current contents of the dictionary (empty at the moment).
})

So the whole thing reads as, “This is a defaultdict whose default factory is the list class, and right now it contains an empty dictionary.”

Microsoft Copilot

零號機

rudimentary: not highly or fully developed

hone: to develop and improve something, especially a skill, over a period of time

churn out: to produce something quickly and in large amounts

ethos: the moral ideas and attitudes that belong to a particular group, society or person

nascent: beginning to exist; not yet fully developed

tangible: ​that you can touch or feel

Fabrication in electronics refers to the complex, multi-step process of manufacturing semiconductor devices—such as integrated circuits (ICs), microprocessors, and memory chips—on a substrate, typically a silicon wafer. This process takes place in highly specialized factories known as fabs (fabrication facilities), which are cleanroom environments designed to eliminate contamination.

indecipherable: (of writing or speech) impossible to read or understand

conviction: a strong opinion or belief

An eye roll is a facial gesture where a person temporarily turns their eyes upward, commonly used to communicate annoyance, boredom, skepticism, or disdain. 

skepticism: an attitude of doubting that claims or statements are true or that something will happen

Bemusement is the state of being bewildered, puzzled, or slightly confused. It represents a feeling of perplexed surprise, often combined with a sense of wonder or mild irony, causing someone to scratch their head at a situation they fail to fully understand.

hash out: to discuss something carefully and completely in order to reach an agreement or decide something

sprout: (of plants or seeds) to produce new leaves or buds; to start to grow

add-in: a computer program that can be added to a larger program to allow it do more things

add-on: a thing that is added to something else

thrill: a strong feeling of excitement or pleasure; an experience that gives you this feeling

sojourn: a temporary stay in a place away from your home

Saffron robes are the traditional garments worn by fully ordained Theravada Buddhist monks and nuns, symbolizing renunciation, simplicity, and dedication to enlightenment.

christen: to give a name to somebody/something

admonishment: admonition: a warning to somebody about their behavior

foray (into something) an attempt to become involved in a different activity or profession

morph: morph (somebody/something) (into somebody/something) to change, or make somebody/something change, into something different

deliberate: done on purpose rather than by accident

venture: a business project or activity, especially one that involves taking risks

Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

Google AI Overview

2026年5月12日星期二

Tuples and Sets in Python

In Python, sets and indexes are two different concepts, and they don’t work together the way lists or tuples do.

The error 'set' object is not subscriptable means you tried to access a set element by index, like this:

mySet = {'a', 'b', 'c'}

print(mySet[0])   # ❌ Error

Subscriptable means you can use square brackets [] to access elements by position (like lists, tuples, strings).

Sets are unordered collections → they don’t have positions or indices.

That’s why Python raises this error.


Defined with curly braces {} or the set() constructor.

mySet = set(('a', 'b', 'c'))

('a', 'b', 'c') → This is a tuple containing three elements.

set(('a', 'b', 'c')) → The set() constructor takes that tuple and converts it into a set.

Result: {'a', 'b', 'c'}

Sets automatically remove duplicates (though here there aren’t any).

mySet now holds a set with the elements 'a', 'b', 'c'.


myList = ['a', 'b', 'b', 'c', 'c'] myList = list(set(myList)) print(myList)

['a', 'b', 'b', 'c', 'c'] → a list with duplicates.

set(myList) → converts the list into a set, automatically removing duplicate

list(set(myList)) → converts the set back into a list

Output: ['a', 'b', 'c']

But the order may vary, e.g. ['b', 'c', 'a'].


mySet.add('d') inserts the element 'd' into the set.

If 'd' was already inside, nothing changes (sets don’t allow duplicates).


while len(mySet):

    print(mySet.pop())

Condition: while len(mySet):

The loop runs as long as the set is not empty (len(mySet) > 0).

Inside the loop:

mySet.pop() removes and returns an arbitrary element from the set.

print() displays that element.

Iteration:

Each loop removes one element until the set becomes empty.

Loop ends when len(mySet) == 0.

The order is not guaranteed because sets are unordered. Running the same code again may give a different sequence.

myList = ['a', 'b', 'c'] print(myList.pop()) # 'c' (last element) print(myList.pop(0)) # 'a' (index 0) print(myList) # ['b']

mySet = {'a', 'b', 'c'}
mySet.discard('a') print(mySet)

mySet.remove('a') → removes 'a', but raises an error if 'a' is not found. mySet.discard('a') → removes 'a' if present, but does nothing if not found (safer).


def returnsMultipleValues(): return 1, 2, 3 print(type(returnsMultipleValues()))

return 1, 2, 3 → In Python, when you separate values with commas, they are automatically packed into a tuple.

Equivalent to: return (1, 2, 3)
So the function returns (1, 2, 3).
type(returnsMultipleValues()) → This checks the type of the returned object.

Output: <class 'tuple'>

a, b, c = returnsMultipleValues()

returnsMultipleValues() returns a tuple (1, 2, 3).

Python then unpacks that tuple into the three variables:
a = 1
b = 2
c = 3

Unpacking variables in Python means taking a collection (tuple, list, set, dict, etc.) and assigning its elements to multiple variables at once.

Microsoft Copilot

白平衡 (White Balance)

Daylight and Cloudy white balance settings differ mainly in color temperature. Daylight is optimized for clear, sunny conditions with direct sunlight, while Cloudy compensates for overcast skies.

overcast: covered with clouds; not bright

Key Differences:

Daylight targets around 5000-5500K, producing neutral tones for bright, overhead sun; it can make cloudy scenes look cooler or bluish.

Cloudy uses 6000-6500K (or higher), adding warmth (yellow/orange tones) to counteract the diffused, cooler light from clouds. It's good for Hong Kong’s cloudy spring weather.

Use Daylight for sunny outdoor shots; switch to Cloudy on overcast days to avoid flat, cold colors.

日光與陰天白平衡設定主要在色溫上有所不同。日光模式適合晴朗、陽光直射的環境,而陰天模式則用來補償多雲天氣。

主要差異:

日光模式:目標色溫約 5000–5500K,在明亮的正午陽光下呈現中性色調;但在陰天場景中可能會顯得偏冷或帶藍色。

陰天模式:使用 6000–6500K(或更高),增加暖色調(黃色/橙色),以抵消雲層散射造成的冷色光。這在香港春季多雲天氣特別適合。

實用建議:晴朗的戶外拍攝使用日光模式;在陰天時切換到陰天模式,避免照片顏色顯得平淡、冷調。

Aperture Priority, ISO 200, 35mm, f/9, 1/200s

White Balance: Cloudy (Warmer)

White Balance: Daylight (Cooler)

Information: Perplexity.AI, Microsoft Copilot, www.oxfordlearnersdictionaries.com

2026年5月11日星期一

Preparation before purchasing iPhone 17

Both iPhone 17 and 17 Pro now feature a 120Hz ProMotion display for smooth scrolling. The standard 17 lacks a dedicated zoom lens, relying on a 2x "optical quality" crop from its main sensor. Both have the new Ceramic Shield 2 (3x more scratch-resistant) on the front, but only the Pro model features it on the back as well.

Whether 8GB of RAM is a "disadvantage" depends largely on how long you intend to keep the phone and how heavily you use multitasking features. In the current generation of mobile tech, 8GB is the baseline for modern "Intelligence" features. Apple has optimized its software so that 8GB can handle complex tasks like local image generation and text summarization.

Given that you are currently using an iPhone SE2 with only 60GB used and plan to keep the iPhone 17 for more than three years, here is a breakdown of why 256GB is likely your "sweet spot," while 512GB is a luxury choice. If you use iCloud (even the 50GB or 200GB plans), your local storage needs drop significantly as older photos are offloaded to the cloud.

iPhone 17 256GB: HKD 6,899

iPhone 17 512GB: HKD 8,599

Your current 50GB iCloud plan is only 20% used (~10GB), so no upgrade needed after getting the iPhone 17—it'll comfortably last 3+ years with your 256GB phone choice.

SE2 stays with you (continue using 60GB photos there or factory reset later)

The iPhone 17 series supports 40W wired fast charging with a compatible USB-C charger, reaching 50% battery in about 20 minutes.

STUDIO A (Apple Premium Reseller)

2197D, 2/F tmtplaza Phase 1

Mon - Thu: 11:00am - 08:00pm

Fri - Sun, PH: 12:00pm - 09:00pm

2026年5月7日星期四

Notebook

Device Using: Lenovo ThinkPad X280
Processor: Intel® Core™ i5-8250U CPU @ 1.60GHz (1.80 GHz)
4 Cores, 6 MB Smart Cache
Operation System: Windows 11 Home
Installed RAM: 8.00 GB (7.85 GB usable)
Graphics Card: Intel(R) UHD Graphics 620 (128 MB)
Storage: 121 GB of 238 GB used
System Type: 64-bit operating system, x64-based processor
Display Size: Size: 12.5 inches (diagonal)
No pen or touch input is available for this display

Latest Device: Lenovo ThinkPad X13 Gen 6
Intel® Core™ Ultra 5 225U Processor
12 Cores, E-cores up to 3.80 GHz P-cores up to 4.80 GHz
A customizable option for SMBs or professionals seeking flexibility
Ideal for lighter tasks and budget-conscious users
Operation System: Windows 11 Pro 64
Memory: 16 GB LPDDR5X-8533MT/s (Soldered)
Storage: 512 GB SSD M.2 2280 PCIe Gen4 TLC Opal
Display: 13.3″ WUXGA (1920×1200) IPS, 400 nits, anti‑glare, 100% sRGB

2026年5月6日星期三

Lists in Python

In Python, list slicing lets you extract portions of a list using the syntax:

list[start:stop:step]

Components

  • start → index where the slice begins (inclusive).

  • stop → index where the slice ends (exclusive).

  • step → interval between indices (default is 1).

numbers = [10, 20, 30, 40, 50, 60] print(numbers[1:4]) # [20, 30, 40] (from index 1 to 3) print(numbers[:3]) # [10, 20, 30] (first 3 elements) print(numbers[3:]) # [40, 50, 60] (from index 3 to end) print(numbers[::2]) # [10, 30, 50] (every 2nd element) print(numbers[::-1]) # [60, 50, 40, 30, 20, 10] (reversed list)

numbers[1:4]
  • Start = 1 → begin at index 1 (the second element, which is 20).

  • Stop = 4 → go up to, but not including, index 4.

  • So you get elements at indices 1, 2, and 320, 30, 40.

Python slicing always excludes the stop index. That’s why 50 (at index 4) isn’t included.

print(numbers[::2])

  • Start = empty → defaults to the beginning of the list (index 0).

  • Stop = empty → defaults to the end of the list.

  • Step = 2 → take every second element.

So Python picks indices 0, 2, 4, ... until the end

myList = [1, 2, 3, 4, 5] print(myList[0:6:2])

Start = 0 → begin at index 0 (1).

Stop = 6 → go up to, but not including, index 6.

Step = 2 → take every second element.

Notice that even though you wrote stop = 6, your list only goes up to index 4. Python slicing doesn’t throw an error — it just stops at the end of the list. That’s why you still get [1, 3, 5].

The range() function in Python generates a sequence of integers, starting from a given start (default 0), stopping before a given stop, and incrementing by a given step (default 1). It’s most often used in loops to control iteration.

range(start, stop, step)

start → optional, default 0. First number in the sequence.

stop → required. Sequence ends before this number.

step → optional, default 1. Difference between consecutive numbers.

Range function is immutable.

>>> for i in range(5): ...     print(i) ... 0 1 2 3 4 >>>

>>> myList = [1,2,3,4] ... myList.append(5) ... print(myList) ... [1, 2, 3, 4, 5] >>>

In Python, lists have several useful methods for adding and removing elements. Let’s look at insert(), remove(), and pop() side by side:

numbers = [10, 20, 30] numbers.insert(1, 15) # insert 15 at index 1 print(numbers) # [10, 15, 20, 30]

numbers = [10, 20, 30, 20] numbers.remove(20) # removes the first 20 print(numbers) # [10, 30, 20]

pop(): remove and return an element at a given index (default is the last element).

>>> myList = [1,2,3,4,5]
>>> myList.pop()
5

numbers = [10, 20, 30] x = numbers.pop(1) # removes element at index 1 print(x) # 20 print(numbers) # [10, 30]

>>> myList = [1,2,3,4,5]
... while len(myList):
...     print(myList.pop())
...
5
4
3
2
1

Loop ends because len(myList) is now 0.

>>> a = [1,2,3,4,5]
... b = a.copy()
... a.append(6)
... print(a)
... print(b)
...
[1, 2, 3, 4, 5, 6]
[1, 2, 3, 4, 5]

b = a.copy() → makes a shallow copy of a.

  • Now b has its own separate list [1,2,3,4,5].

Microsoft Copilot

White Balance

Auto (White Priority): best for indoor fluorescent or mixed light

Shade: adds warmth to counter bluish tones

Cloudy: warmer balance, good for HK’s cloudy spring weather

Tungsten Light: best for indoor with incandescent bulbs

White Fluorescent Light: best for offices, malls in HK

Microsoft Copilot