hpareek

Untitled

Jun 19th, 2017
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. First button click- got a list from database table [1, 6, 7, 8]
  2.  
  3. Now i have to add this in a blank list.So as the first button is clicked it should give you the same list [[1, 6, 7, 8]] because there is a only one list to add.
  4.  
  5. and i am getting [[1, 6, 7, 8]]
  6.  
  7. second button click- got a list from database [1, 2, 5, 6, 7, 8]
  8.  
  9. Now second button is clicked so i should get [[1, 6, 7, 8],[1, 2, 5, 6, 7, 8]]
  10.  
  11. but what i am getting is [[1, 2, 5, 6, 7, 8]]
  12.  
  13. Third button click- got a list [2, 4, 7, 8]
  14.  
  15. after clicking third button [[1, 6, 7, 8],[1, 2, 5, 6, 7, 8],[2, 4, 7, 8]]
  16.  
  17. but i am getting [[2, 4, 7, 8]]
  18.  
  19. And so on depending on the number of buttons selected by user,which we don't how many buttons he can select.
  20.  
  21. Output after applying intersection function [7,8]
Add Comment
Please, Sign In to add comment