python logo

Lists

Lists using square brackets [] Example of Lists int_list = [1, 20, 77, 800, 39, 21, 5] str_list = ["python", "javascript", "java", "rust", "go", "dart"] print(int_list) print(type(int_list)) print(str_list) print(type(str_list)) Some of the things that I could do with lists: Sort the values in ascending or descending order Find values in list or details about the list Insert or remove values from the list Get a sub-list from the list Iterate through the list and perform functions or checks on each list item Some functions that could help me work with lists:...

February 22, 2022 · 4 min · Kei