Actually, it’s not accurate. The pixel values are in range [0, 255] not [0, 1], When you open an image with PIL, you get an object of the following classes depending on JPG or PNG:
from PIL import Image

img1 = Image.open('filename.jpg')
print(type(img1))
<class 'PIL.JpegImagePlugin.JpegImageFile'>

img2 = Image.open('filename.png')
print(type(img2))
<class 'PIL.PngImagePlugin.PngImageFile'>

To see the pixel-values of these objects, you can use list(img1.getdata()) or np.asarray(img1) which will show the values [0, 255]:
>>> np.asarray(img1)[:2, :2]
array([[[255, 255, 255],
        [255, 255, 255]],

       [[255, 255, 255],
        [255, 255, 255]]], dtype=uint8)