Category : nested-lists

In the following code, queryResult is a Nested Lists. A nested list means all of the list values had another list. LIKE: [(1024, jkhsa97890),(1025, khka65757),(1025, kjhaksd87987), ….] So with the first loop, we are getting lists fromqueryResult and storing them in the record. ARRAYS STORED IN RECORD: (1024, jkhsasa97890) (1025, khkaada65757) (1025, kjhaksd87987) …. Then ..

Read more

I have a list which looks like this: working_list=[‘one’, ‘two’, ‘three’, ‘four’, ‘five’] And I want to have a new list which would look like this: output_list=[‘one or two’,’one or two’,’three’,’four or five’,’four or five’] For that, I have created two other lists: old_names=[[‘one’,’two’],[‘four’,’five’]] new_names=[‘one or two’,’four or five’] And then I tried: output_list=[] for ..

Read more