start_1

Start with 2 int lists, a and b, of any length. Return how many of the lists have 1 as their first element.

This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.

Test 1

Input:

[1, 2, 3]
[1, 3]

Output:

2

Test 2

Input:

[7, 2, 3]
[1]

Output:

1

Test 3

Input:

[1, 2]
[]

Output:

1

Test 4

Input:

[]
[1, 2]

Output:

1

Test 5

Input:

[7]
[]

Output:

0

Test 6

Input:

[7]
[1]

Output:

1

Test 7

Input:

[1]
[1]

Output:

2

Test 8

Input:

[7]
[8]

Output:

0

Test 9

Input:

[]
[]

Output:

0

Test 10

Input:

[1, 3]
[1]

Output:

2