-
Create a function website() that grabs the website domain from a URL string. For example, if your function is passed "www.google.com", it should return "google".
-
Create a function divisible(a, b) that accepts two integers (a and b) and returns True if a is divisible by b without a remainder. For example, divisible(10, 3) should return False, while divisible(6, 3) should return True.
-
Use list comprehension to square every number in the following list of numbers:
l = [1, 2, 3, 4, 5, 6, 7, 8, 9].
-
For the following list of names, write a list comprehension that creates a list of only words that start with a capital letter. Hint: str.isupper().
names = ['Steve Irwin', 'koala', 'kangaroo', 'Australia', 'Sydney', 'desert']