input: Write a function to scrape photos and captions from a given website. The function should accept a URL as input and return a list of dictionaries where each dictionary contains the URL of the photo and its caption. If the photo has no caption, the dictionary should contain an empty string for the caption.
  assert scrape_photos_and_captions('https://example.com/webpage')==[{"photo": "https://example.com/image1.jpg", "caption": "Example Caption"}, {"photo": "https://example.com/image2.jpg", "caption": ""}]
output: def scrape_photos_and_captions(url):
      import requests
      from bs4 import BeautifulSoup
      
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
      
      photos_and_captions = []
      
      for img in soup.find_all('img'):
          photo_url = img.get('src')
          caption = img.get('alt', '')
          photos_and_captions.append({"photo": photo_url, "caption": caption})
      
      return photos_and_captions