Write a program to print out the first element of a list
that is not consecutive. For example, if the input list is
[1,2,3,4,8,9], the output should be 8.
If the whole list is consecutive, your output should be None.
If the list is empty or only have one element, you should
also print out None. You can assume the list is sorted in
increasing order.

Solution submitted by Andrew at June 26, 2020, 2:05 a.m.

```
input = [1, 2, 3, 4, 5, 8, 9]
for i in input:
number_before_i = i - 1
if i == 1:
continue
if number_before_i not in input:
print(i)
```

You need login to submit your solution

Doubles

Shift Code

Sum Of Consecutive Prime Numbers

Find PI

Safest Positions

Largest Number Obtained

Integer Solutions Of Equation

Split a String in Balanced Strings

Jewels and Stones

Sort List By Parity

Mose Code Words

Steps To Zero

Prime Number List

First Nonconsective Number

Progress Bar

You need login to comment