This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.appengine.api import urlfetch | |
from bs4 import BeautifulSoup | |
class FlickrPhoto(object): | |
""" | |
Construct the base url for flickr photo. | |
""" | |
base_url = 'http://farm%s.staticflickr.com/%s/%s_%s_%s.jpg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Python palidrome finders. | |
3 methods for finding palindromes with python. | |
""" | |
def is_palindrome_v1(s): | |
if len(s) <= 1: | |
return True | |
else: | |
return s[0] == s[-1] and is_palindrome_v1(s[1:-1]) |