Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- First button click- got a list from database table [1, 6, 7, 8]
- 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.
- and i am getting [[1, 6, 7, 8]]
- second button click- got a list from database [1, 2, 5, 6, 7, 8]
- Now second button is clicked so i should get [[1, 6, 7, 8],[1, 2, 5, 6, 7, 8]]
- but what i am getting is [[1, 2, 5, 6, 7, 8]]
- Third button click- got a list [2, 4, 7, 8]
- after clicking third button [[1, 6, 7, 8],[1, 2, 5, 6, 7, 8],[2, 4, 7, 8]]
- but i am getting [[2, 4, 7, 8]]
- And so on depending on the number of buttons selected by user,which we don't how many buttons he can select.
- Output after applying intersection function [7,8]
Add Comment
Please, Sign In to add comment