human
Maximum sum such that no two elements are adjacent | Function to return max sum such that no two elements are adjacent.
Current max excluding i ( No ternary in Python ).
Current max including i.
return max of incl and excl.
Driver program to test above function"
How can the above be solved in Python?

Write me a code to maximum sum such that no two elements are adjacent and the other steps required?
assistant
#Here is code to maximum sum such that no two elements are adjacent and the other steps required.
 def find_max_sum ( arr ) :
	incl = 0
	excl = 0
	for i in arr :
		new_excl = excl if excl > incl else incl
		incl = excl + i
		excl = new_excl
	return ( excl if excl > incl else incl )
arr = [ 5 , 5 , 10 , 100 , 10 , 5 ]
print find_max_sum ( arr )