Guest User

Untitled

a guest
Apr 5th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. def almostIncreasingSequence(sequence):
  2.     copy=sequence[:]
  3.     #print (copy)
  4.    
  5.     for i in range (0,len(sequence)):
  6.         sequence.remove(sequence[i])
  7.         if(len(sequence)==len(set(sequence)) and sequence==sorted(sequence)):
  8.        
  9.             return True
  10.         print(sequence)
  11.         sequence=copy[:]
  12.         #print (copy)
  13.     return False
Advertisement
Add Comment
Please, Sign In to add comment