python_lists
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python_lists [2023/05/01 15:50] – [read file as list of strings] admin | python_lists [2023/11/07 21:51] (current) – [search one list in another] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== dummy ===== | ===== dummy ===== | ||
==== tasks ==== | ==== tasks ==== | ||
+ | * [[check if two lists are equal]] | ||
* [[get unique items in a list]] | * [[get unique items in a list]] | ||
* [[convert a string to a list]] | * [[convert a string to a list]] | ||
+ | |||
+ | ==== search one list in another ==== | ||
+ | < | ||
+ | >>> | ||
+ | >>> | ||
+ | [' | ||
+ | >>> | ||
+ | >>> | ||
+ | [' | ||
+ | >>> | ||
+ | >>> | ||
+ | [10, 0, 12, 0, 17, 0, 9, 20] | ||
+ | >>> | ||
+ | >>> | ||
+ | [' | ||
+ | </ | ||
+ | |||
+ | tags | identify the indices | ||
+ | |||
==== read file as list of strings ==== | ==== read file as list of strings ==== | ||
Line 11: | Line 31: | ||
</ | </ | ||
+ | ==== Check if a variable is a list ==== | ||
+ | < | ||
+ | % python | ||
+ | Python 3.11.4 (main, Jul 5 2023, 13:45:01) [GCC 11.2.0] on linux | ||
+ | Type " | ||
+ | >>> | ||
+ | True | ||
+ | >>> | ||
+ | False | ||
+ | </ | ||
python_lists.1682956257.txt.gz · Last modified: 2023/05/01 15:50 by admin