Q:

How does digital audio store the sound information?

I play with python wave module, and read some articles about digital audio, but still do not understand how the data are sufficient.
The digital data is an array of amplitude vs. time. For 1s mono audio with a rate of 22050, I have the amplitude values at 22050 points (1/22050 s intervals).
This curve represents how the loudness is changed over 1s time. But how is this curve different if the 1s audio is a play of A note on a piano or E note?
I expected that at each frame (1/22050 s interval) we have a set of data for amplitude vs. frequency, since a sound is a combination of various frequencies (having different loudness).
How a set of 22050 numbers can produce different 1s audios (zillion number of different sounds)?

A:

The important point you are missing in this process is digitization. Here is a simplified explanation. In what follows we assume no data encoding nor data compression. 
Imagine first we start with a very low frequency signal, say a sine wave at 1Hz. We sample this waveform at your sample rate of 22050 samples per second. We now have a data file consisting of 22050 sequential amplitude measurements or "slices" of a 1Hz sine wave which starts at zero, climbs to a maximum, falls to a minimum, and ends up at zero again, during one second. 
Now we look at each sample number and convert it from an analog voltage measurement in base-10 decimal to a binary number between, say, 0 and 256. Now we have a file consisting of 22050 binary numbers in sequence, each of which is an 8-bit binary number. 
Let's make a chart of these numbers, with time slices on the x-axis and those bit counts on the y-axis with one string for each time slice. If we draw a little line between the peaks of each adjacent pair of bit counts we get a replica of the sine wave consisting of 22050 little straight lines that rise up and fall down to follow the outline of the original sine wave. 
Now you can see that if we started out with a different frequency sine wave, say 100Hz, we get a similar file of 22050 time slices, each of which is a 256-bit binary number representing the instantaneous height of the 100Hz sine wave. That wave rises and falls 100 times in one second, and if we "connect the dots" as in the first example, we get back a graph of 22015 little straight-line segments that rise and fall and which looks pretty much like the 100Hz sine wave we started with. 
This means that we can sample a whole range of different frequencies in this way, and when we "play them back" by making that graph, we get a replica of the waveform we started with. 

