They both have two electron shells
<h3>Further explanation</h3>
The period 2 element lies in the second row of the periodic system.
Consists of the elements: lithium, beryllium, boron, carbon, nitrogen, oxygen, fluorine, and neon
atomic number : 3
electron configuration : [He] 2s¹
atomic number = number of proton=number of electron(in neutral atom)
So Li have 3 protons and 3 electrons
Because it fills the 2s orbital it has 2 shells
atomic number : 8
electron configuration : [He] 2s²2p⁴
So O have 8 protons and 8 electrons
Because it fills the 2s and 2p orbital it has 2 shells
So Lithium (Li) and Oxygen (O) are both have two electron shells