Very simple and calls less if conditions:

```
class Solution(object):
def islandPerimeter(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
perim = 0
for i in range(len(grid)):
for j in range(len(grid[0])):
if grid[i][j] == 1:
perim += 4
if (i>=1) and grid[i-1][j] == 1:
perim -= 2
if (j>=1) and grid[i][j-1] == 1:
perim -= 2
return perim
```